[package]
name = "wasmi"
version.workspace = true
rust-version.workspace = true
documentation = "https://docs.rs/wasmi/"
description = "WebAssembly interpreter"
authors.workspace = true
repository.workspace = true
edition.workspace = true
readme.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
exclude = [
"benches/wat",
"benches/wasm",
"tests/spec/testsuite",
"**.wast",
]
[dependencies]
wasmi_core = { workspace = true }
wasmi_collections = { workspace = true }
wasmi_ir = { workspace = true }
wasmparser = { workspace = true, features = ["validate", "features"] }
wat = { workspace = true, optional = true }
spin = { version = "0.9", default-features = false, features = [
"mutex",
"spin_mutex",
"rwlock",
] }
[dev-dependencies]
assert_matches = "1.5"
criterion = { version = "0.5", default-features = false }
[features]
default = ["stable", "std", "wat"]
std = [
"wasmi_core/std",
"wasmi_collections/std",
"wasmparser/std",
"spin/std",
]
hash-collections = [
"wasmi_collections/hash-collections",
"wasmparser/hash-collections",
]
prefer-btree-collections = [
"wasmi_collections/prefer-btree-collections",
"wasmparser/prefer-btree-collections",
]
wat = ["dep:wat", "std"]
simd = ["wasmi_core/simd", "wasmi_ir/simd", "wasmparser/simd"]
stable = []
unstable = []
# Enables a portable dispatch scheme that avoids tail-call reliance.
# Recommended for targets without stable or guaranteed tail-call support.
portable-dispatch = []
# Enables an indirect dispatch scheme using op-codes instead of
# embedded function pointers for more compact bytecode.
indirect-dispatch = []
# Enables extra checks performed during Wasmi bytecode execution.
#
# These checks are unnecessary as long as Wasmi translation works as intended.
# If Wasmi translation invariants are broken due to bugs, these checks prevent
# Wasmi execution to exhibit undefined behavior (UB) in certain cases.
#
# Expected execution overhead is upt to 20%, if enabled.
#
# - Enable if your focus is on safety.
# - Disable if your focus is on execution speed.
extra-checks = []
bench
name = "benches"
harness = false
[package.metadata.docs.rs]
features = ["std", "wat", "simd"]