Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-hash-maps crate feature to wasmi_cli + enable by default #1225

Merged
merged 4 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ wat = "1"
[dev-dependencies]
assert_cmd = "2.0.7"

[features]
default = ["no-hash-maps"]
no-hash-maps = ["wasmi/no-hash-maps"]

# We need to put this [profile.release] section due to this bug in Cargo:
# https://github.com/rust-lang/cargo/issues/8264
# Uncomment the lines below before publishing a new `wasmi_cli` release to crates.io.
Expand Down
8 changes: 7 additions & 1 deletion crates/collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ string-interner = { version = "0.17", default-features = false, features = ["inl
ahash = { version = "0.8.11", default-features = false }

[features]
default = ["std"]
default = ["std", "no-hash-maps"]
std = ["string-interner/std"]
# Tells the `wasmi_collections` crate to avoid using hash based maps and sets.
#
Expand All @@ -29,3 +29,9 @@ std = ["string-interner/std"]
#
# An example of such an environment is `wasm32-unknown-unknown`.
no-hash-maps = []

[package.metadata.cargo-udeps.ignore]
normal = [
# The string-interner dependency is always specified even though it is unused when no-hash-maps is enabled.
"string-interner"
]
2 changes: 1 addition & 1 deletion crates/wasmi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ anyhow = "1.0"
criterion = { version = "0.5", default-features = false }

[features]
default = ["std"]
default = ["std", "no-hash-maps"]
std = [
"wasmi_core/std",
"wasmi_collections/std",
Expand Down
Loading