Skip to content

Commit

Permalink
Make more dependencies optional
Browse files Browse the repository at this point in the history
  • Loading branch information
philipc committed Jan 9, 2020
1 parent acf9f74 commit cc2614f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ travis-ci = { repository = "gimli-rs/gimli" }
coveralls = { repository = "gimli-rs/gimli" }

[dependencies]
arrayvec = { version = "0.5.0", default-features = false }
arrayvec = { version = "0.5.0", default-features = false, optional = true }
byteorder = { version = "1.0", default-features = false }
fallible-iterator = { version = "0.2.0", default-features = false }
fallible-iterator = { version = "0.2.0", default-features = false, optional = true }
indexmap = { version = "1.0.2", optional = true }
smallvec = { version = "1.1.0", default-features = false }
smallvec = { version = "1.1.0", default-features = false, optional = true }
stable_deref_trait = { version = "1.1.0", default-features = false, optional = true }

[dev-dependencies]
Expand All @@ -36,8 +36,8 @@ test-assembler = "0.1.3"
typed-arena = "2"

[features]
read = ["stable_deref_trait"]
write = ["std", "indexmap"]
read = ["arrayvec", "fallible-iterator", "smallvec", "stable_deref_trait"]
write = ["indexmap"]
std = ["fallible-iterator/std", "stable_deref_trait/std"]
default = ["read", "write", "std"]

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#[macro_use]
extern crate alloc;

#[cfg(feature = "std")]
#[cfg(any(feature = "std", feature = "write"))]
#[macro_use]
extern crate std;

Expand Down

0 comments on commit cc2614f

Please sign in to comment.