setup no-std ability

This commit is contained in:
Ren Kararou 2023-12-21 18:33:11 -06:00
parent 243c882f23
commit c573867598
Signed by: spicywolf
GPG key ID: B0BA4EEC0714F8E6
3 changed files with 21 additions and 0 deletions

7
Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "mailf0rm"
version = "0.1.0"

View file

@ -3,6 +3,10 @@ name = "mailf0rm"
version = "0.1.0"
edition = "2021"
[features]
default = []
no-std = []
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View file

@ -1,3 +1,13 @@
#![cfg_attr(feature = "no-std"), no_std)]
// example std && no_std setup
//#[cfg(feature = "no-std")]
//use core::alloc::Layout;
//
//#[cfg(not(feature = "no-std"))]
//use std::alloc::Layout;
// Autogenerated Code
pub fn add(left: usize, right: usize) -> usize {
left + right
}