1 #![no_std] 2 // These features are needed to support no_std + alloc 3 #![feature(lang_items)] 4 #![feature(alloc_error_handler)] 5 #![feature(core_intrinsics)] 6 #![allow(unused_imports)] 7 use custom_alloc; 8 9 #[cfg(all(not(feature = "std"), not(test)))] 10 mod no_std; 11 12 #[cfg(not(feature = "std"))] 13 #[no_mangle] return_5_in_no_std() -> i3214pub extern "C" fn return_5_in_no_std() -> i32 { 15 5 16 } 17 18 #[cfg(feature = "std")] 19 #[no_mangle] return_5_in_no_std() -> i3220pub extern "C" fn return_5_in_no_std() -> i32 { 21 6 22 } 23