setup no-std ability
This commit is contained in:
parent
243c882f23
commit
c573867598
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal 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"
|
|
@ -3,6 +3,10 @@ name = "mailf0rm"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
no-std = []
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
10
src/lib.rs
10
src/lib.rs
|
@ -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 {
|
pub fn add(left: usize, right: usize) -> usize {
|
||||||
left + right
|
left + right
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue