The build script was added to obtain the correct values of the errno C preprocessor definitions. This way no matter what the platform has defined them as, they will be correct in the libraries code.
44 lines
892 B
Rust
44 lines
892 B
Rust
//!
|
|
|
|
// Handle using the core or the std of Rust depending on the chosen feature.
|
|
#![cfg_attr(not(feature="use_std"), no_std)]
|
|
|
|
// This crate can only use parts of Rust that are in both the core
|
|
// and the standard library. This way the logging system will work for
|
|
// libraries that use either.
|
|
//
|
|
// This is handled by coding using the std library and referencing the core
|
|
// library as the std library if the core library is desired.
|
|
#[cfg(not(feature="use_std"))]
|
|
extern crate core as std;
|
|
|
|
#[macro_use]
|
|
extern crate scribe;
|
|
|
|
#[macro_use]
|
|
extern crate binding;
|
|
|
|
extern crate weave;
|
|
|
|
|
|
|
|
#[cfg(not(feature="rust_lib"))]
|
|
mod c;
|
|
|
|
#[cfg(feature="rust_lib")]
|
|
mod rust;
|
|
|
|
#[cfg(feature="no_mem_manip")]
|
|
mod mem;
|
|
|
|
|
|
|
|
#[cfg(not(feature="rust_lib"))]
|
|
pub use self::c::*;
|
|
|
|
#[cfg(feature="rust_lib")]
|
|
pub use self::rust::*;
|
|
|
|
#[cfg(any(feature="no_mem_manip", feature="rust_lib"))]
|
|
pub use self::mem::*;
|