Skip to content

Commit

Permalink
Prepare for inclusion into libstd
Browse files Browse the repository at this point in the history
This applies the same change as gimli-rs/gimli#503 to this crate.
  • Loading branch information
alexcrichton committed May 14, 2020
1 parent 3879fc5 commit 7c96d2a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ addons:
- libssl-dev

script:
- cargo build --all-features && cargo test --all-features && cargo doc --all-features
- cargo build --features all && cargo test --features all && cargo doc --features all
- cargo build --no-default-features --features read
- cargo build --no-default-features --features write
- cargo build --no-default-features --features read_core,write_core,coff
Expand Down
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ flate2 = { version = "1", optional = true }
indexmap = { version = "1.1", optional = true }
wasmparser = { version = "0.54", optional = true }

# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
compiler_builtins = { version = '0.1.2', optional = true }
alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-alloc' }

[dev-dependencies]
memmap = "0.7"

Expand All @@ -38,6 +44,14 @@ wasm = ["wasmparser"]

default = ["read", "compression"]

# Umbrella feature for enabling all user-facing features of this crate. Does not
# enable internal features like `rustc-dep-of-std`.
all = ["read", "write", "std", "compression", "default"]

# Internal feature, only used when building as part of libstd, not part of the
# stable interface of this crate.
rustc-dep-of-std = ['core', 'compiler_builtins', 'alloc']

[[example]]
name = "nm"
required-features = ["read"]
Expand Down

0 comments on commit 7c96d2a

Please sign in to comment.