File tree Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Expand file tree Collapse file tree 4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,19 @@ sudo: required
33dist : trusty
44rust :
55 - 1.0.0
6+ - stable
67 - beta
78 - nightly
89services :
910 - docker
1011script :
1112 - if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then
1213 sh ci/run-travis.sh;
14+ elif [[ $TRAVIS_RUST_VERSION = "1.0.0" ]]; then
15+ cargo build;
1316 else
1417 cargo build;
18+ cargo build --no-default-features;
1519 fi
1620os :
1721 - linux
Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ other common platform libraries.
1414"""
1515
1616[features ]
17- default = []
17+ default = [" use_std" ]
18+ use_std = []
Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ Next, add this to your crate root:
2424extern crate libc;
2525```
2626
27+ Currently libc by default links to the standard library, but if you would
28+ instead like to use libc in a ` #![no_std] ` situation or crate you can request
29+ this via:
30+
31+ ``` toml
32+ [dependencies ]
33+ libc = { version = " 0.2" , default-features = false }
34+ ```
35+
2736## What is libc?
2837
2938The primary purpose of this crate is to provide all of the definitions necessary
Original file line number Diff line number Diff line change 8282 reason = "use `libc` from crates.io" ,
8383 issue = "27783" ) ) ]
8484
85- #[ cfg( all( not( stdbuild) , not( dox) ) ) ]
85+ #![ cfg_attr( not( feature = "use_std" ) , no_std) ]
86+
87+ #[ cfg( all( not( stdbuild) , not( dox) , feature = "use_std" ) ) ]
8688extern crate std as core;
8789
8890#[ macro_use] mod macros;
You can’t perform that action at this time.
0 commit comments