From 6e350daf2609428546cd3d48961397f363246045 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Wed, 1 Mar 2017 19:16:54 -0500 Subject: [PATCH] Changed the C library to properly be the default library. --- Cargo.toml | 4 ++-- README.md | 9 ++------- src/lib.rs | 10 +++++----- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c035639..9cc42c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,9 +10,9 @@ keywords = ["c", "libc", "binding", "ffi", "pact", "nostd"] [features] -default = ["c_lib"] +default = [] use_std = ["scribe/use_std", "binding/use_std"] -c_lib = [] +rust_lib = [] no_mem_manip = [] weak = [] diff --git a/README.md b/README.md index 57bd5b1..f7d100c 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,7 @@ at the 'C' binding level. ### Standard C Library ### -This is the default feature set. Or you can add: - -``` - default-features = false - features = ["c_lib"] -``` +This is the default feature set. It will provide a link to the 'C' standard library. This will make it so that your code is executable and can call functions and use structures from @@ -44,8 +39,8 @@ functions that Rust requires for LLVM. These are: * memcpy * memmove - * memset * memcmp + * memset ### Weak ### diff --git a/src/lib.rs b/src/lib.rs index 18c0e50..1c34b5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,10 +20,10 @@ extern crate binding; -#[cfg(feature="c_lib")] +#[cfg(not(feature="rust_lib"))] mod c; -#[cfg(not(feature="c_lib"))] +#[cfg(feature="rust_lib")] mod rust; #[cfg(feature="no_mem_manip")] @@ -31,11 +31,11 @@ mod mem; -#[cfg(feature="c_lib")] +#[cfg(not(feature="rust_lib"))] pub use self::c::*; -#[cfg(not(feature="c_lib"))] +#[cfg(feature="rust_lib")] pub use self::rust::*; -#[cfg(feature="no_mem_manip")] +#[cfg(any(feature="no_mem_manip", feature="rust_lib"))] pub use self::mem::*;