Skip to content

Commit c3b7cd6

Browse files
committed
Add std feature to Cargo manifest
This enables use of this crate in environments where std is not available.
1 parent 6a8631a commit c3b7cd6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Cargo.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,25 @@ version = "0.2.3"
1212
readme = "README.md"
1313
build = "build.rs"
1414

15+
[package.metadata.docs.rs]
16+
features = ["std"]
17+
1518
[dependencies]
16-
num-traits = "0.2"
1719
proc-macro2 = "0.4.2"
1820
quote = "0.6"
1921
syn = "0.15"
2022

23+
[dependencies.num-traits]
24+
version = "0.2"
25+
default-features = false
26+
2127
[dev-dependencies]
2228
num = "0.2"
2329

2430
[features]
31+
default = ["std"]
2532
full-syntax = ["syn/full"]
33+
std = ["num-traits/std"]
2634

2735
[lib]
2836
name = "num_derive"

0 commit comments

Comments
 (0)