Skip to content

Commit 47e63a5

Browse files
committed
Prepare for inclusion into libstd
This applies the same change as gimli-rs/gimli#503 to this crate.
1 parent 3879fc5 commit 47e63a5

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ addons:
2525
- libssl-dev
2626

2727
script:
28-
- cargo build --all-features && cargo test --all-features && cargo doc --all-features
28+
- cargo build --features all && cargo test --features all && cargo doc --features all
2929
- cargo build --no-default-features --features read
3030
- cargo build --no-default-features --features write
3131
- cargo build --no-default-features --features read_core,write_core,coff

Cargo.toml

+15-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,20 @@ repository = "https://github.com/gimli-rs/object"
1010
description = "A unified interface for reading and writing object file formats."
1111

1212
[package.metadata.docs.rs]
13-
all-features = true
13+
features = ['all']
1414

1515
[dependencies]
1616
crc32fast = { version = "1.2", optional = true }
1717
flate2 = { version = "1", optional = true }
1818
indexmap = { version = "1.1", optional = true }
1919
wasmparser = { version = "0.54", optional = true }
2020

21+
# Internal feature, only used when building as part of libstd, not part of the
22+
# stable interface of this crate.
23+
core = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-core' }
24+
compiler_builtins = { version = '0.1.2', optional = true }
25+
alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-alloc' }
26+
2127
[dev-dependencies]
2228
memmap = "0.7"
2329

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

3945
default = ["read", "compression"]
4046

47+
# Umbrella feature for enabling all user-facing features of this crate. Does not
48+
# enable internal features like `rustc-dep-of-std`.
49+
all = ["read", "write", "std", "compression", "default"]
50+
51+
# Internal feature, only used when building as part of libstd, not part of the
52+
# stable interface of this crate.
53+
rustc-dep-of-std = ['core', 'compiler_builtins', 'alloc']
54+
4155
[[example]]
4256
name = "nm"
4357
required-features = ["read"]

0 commit comments

Comments
 (0)