diff options
author | Alex Crichton <alex@alexcrichton.com> | 2016-01-20 16:39:37 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2016-02-10 17:21:21 -0800 |
commit | 6d46b6fa5fc8cbb468e5ec0f9b72e2af8414d9ac (patch) | |
tree | 26b9cfb59b9700558b112e3edcd075e7f6dff3ba /README.md | |
parent | 379e92f27e6bba4ade704d993f8ce57d8a507e0b (diff) | |
download | rust-libc-6d46b6fa5fc8cbb468e5ec0f9b72e2af8414d9ac.tar.gz |
Add a default-on "use_std" feature
This adds a `use_std` Cargo feature which disables `#![no_std]` builds of libc,
but is enabled by default. The library will currently continue to link to the
standard library to maintain backwards compatibility with the 0.2 series and
older Rust compilers for now, but this default can possible be changed in the
future.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -24,6 +24,15 @@ Next, add this to your crate root: extern crate libc; ``` +Currently libc by default links to the standard library, but if you would +instead like to use libc in a `#![no_std]` situation or crate you can request +this via: + +```toml +[dependencies] +libc = { version = "0.2", default-features = false } +``` + ## What is libc? The primary purpose of this crate is to provide all of the definitions necessary |