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
3
3
dist : trusty
4
4
rust :
5
5
- 1.0.0
6
+ - stable
6
7
- beta
7
8
- nightly
8
9
services :
9
10
- docker
10
11
script :
11
12
- if [[ $TRAVIS_RUST_VERSION = nightly* ]]; then
12
13
sh ci/run-travis.sh;
14
+ elif [[ $TRAVIS_RUST_VERSION = "1.0.0" ]]; then
15
+ cargo build;
13
16
else
14
17
cargo build;
18
+ cargo build --no-default-features;
15
19
fi
16
20
os :
17
21
- linux
Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ other common platform libraries.
14
14
"""
15
15
16
16
[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:
24
24
extern crate libc;
25
25
```
26
26
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
+
27
36
## What is libc?
28
37
29
38
The primary purpose of this crate is to provide all of the definitions necessary
Original file line number Diff line number Diff line change 82
82
reason = "use `libc` from crates.io" ,
83
83
issue = "27783" ) ) ]
84
84
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" ) ) ]
86
88
extern crate std as core;
87
89
88
90
#[ macro_use] mod macros;
You can’t perform that action at this time.
0 commit comments