Skip to content

Commit

Permalink
We are std.
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Aug 25, 2024
1 parent 170b9e2 commit 09e1c3e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ categories = ["compression"]
byteorder = { version = "1.5", default-features = false }
twox-hash = { version = "1.6", default-features = false, 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' }
alloc = { version = '1.0.0', optional = true, package = 'rustc-std-workspace-alloc' }
compiler_builtins = { version = '0.1.2', optional = true }

[dev-dependencies]
criterion = "0.5"
rand = { version = "0.8.5", features = ["small_rng"] }
Expand All @@ -25,6 +31,10 @@ default = ["hash", "std"]
hash = ["dep:twox-hash"]
std = []

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

[[bench]]
name = "reversedbitreader_bench"
harness = false
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#[cfg(feature = "std")]
extern crate std;

#[cfg(not(feature = "rustc-dep-of-std"))]
extern crate alloc;

#[cfg(feature = "std")]
Expand Down

0 comments on commit 09e1c3e

Please sign in to comment.