[package]
edition = "2024"
rust-version = "1.90.0"
name = "wasmtime"
version = "41.0.2"
authors = ["The Wasmtime Project Developers"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-level API to expose the Wasmtime runtime"
documentation = "https://docs.rs/wasmtime"
readme = "README.md"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
resolver = "2"
[package.metadata.docs.rs]
all-features = true
[features]
addr2line = [
"dep:addr2line",
"dep:gimli",
"std",
]
all-arch = [
"wasmtime-cranelift?/all-arch",
"wasmtime-winch?/all-arch",
"pulley",
]
async = [
"dep:wasmtime-fiber",
"wasmtime-component-macro?/async",
"runtime",
]
cache = [
"dep:wasmtime-cache",
"std",
]
call-hook = []
compile-time-builtins = [
"dep:wasm-compose",
"dep:tempfile",
]
component-model = [
"wasmtime-environ/component-model",
"wasmtime-cranelift?/component-model",
"wasmtime-winch?/component-model",
"dep:wasmtime-component-macro",
"dep:wasmtime-component-util",
"dep:encoding_rs",
"dep:semver",
]
component-model-async = [
"async",
"component-model",
"std",
"wasmtime-component-macro?/component-model-async",
"dep:futures",
"futures/std",
]
component-model-async-bytes = [
"component-model-async",
"dep:bytes",
]
coredump = [
"dep:wasm-encoder",
"runtime",
"std",
]
cranelift = [
"dep:wasmtime-cranelift",
"std",
"wasmtime-unwinder/cranelift",
]
custom-native-signals = []
custom-sync-primitives = []
custom-virtual-memory = []
debug = [
"runtime",
"async",
]
debug-builtins = ["wasmtime-jit-debug/gdb_jit_int"]
default = [
"async",
"cache",
"gc",
"gc-drc",
"gc-null",
"wat",
"profiling",
"parallel-compilation",
"cranelift",
"pooling-allocator",
"demangle",
"addr2line",
"coredump",
"debug-builtins",
"runtime",
"component-model",
"component-model-async",
"threads",
"stack-switching",
"std",
"debug",
"compile-time-builtins",
]
demangle = [
"wasmtime-environ/demangle",
"std",
]
gc = [
"wasmtime-environ/gc",
"wasmtime-cranelift?/gc",
"wasmtime-winch?/gc",
]
gc-drc = [
"gc",
"wasmtime-environ/gc-drc",
"wasmtime-cranelift?/gc-drc",
"wasmtime-winch?/gc-drc",
]
gc-null = [
"gc",
"wasmtime-environ/gc-null",
"wasmtime-cranelift?/gc-null",
"wasmtime-winch?/gc-null",
]
incremental-cache = [
"wasmtime-cranelift?/incremental-cache",
"std",
]
memory-protection-keys = ["pooling-allocator"]
parallel-compilation = [
"dep:rayon",
"std",
]
pooling-allocator = [
"runtime",
"std",
]
profile-pulley = [
"pulley",
"profiling",
"pulley-interpreter/profile",
]
profiling = [
"dep:fxprof-processed-profile",
"dep:ittapi",
"dep:rustix",
"rustix/thread",
"dep:serde_json",
"std",
"wasmtime-jit-debug/perf_jitdump",
]
pulley = []
reexport-wasmparser = []
runtime = [
"dep:cc",
"dep:smallvec",
"dep:mach2",
"dep:memfd",
"dep:wasmtime-slab",
"dep:wasmtime-versioned-export-macros",
"dep:windows-sys",
"pulley-interpreter/interp",
"dep:wasmtime-unwinder",
"dep:async-trait",
]
stack-switching = [
"runtime",
"std",
"wasmtime-environ/stack-switching",
"wasmtime-cranelift?/stack-switching",
"wasmtime-winch?/stack-switching",
]
std = [
"postcard/use-std",
"wasmtime-environ/std",
"object/std",
"once_cell",
"wasmtime-fiber?/std",
"pulley-interpreter/std",
"wasmtime-math/std",
"addr2line?/std",
"dep:rustix",
"wasmtime-jit-icache-coherence",
"wasmtime-jit-debug?/std",
]
threads = [
"wasmtime-cranelift?/threads",
"wasmtime-winch?/threads",
"std",
]
trace-log = ["wasmtime-cranelift?/trace-log"]
wave = [
"dep:wasm-wave",
"component-model",
]
winch = [
"dep:wasmtime-winch",
"std",
]
wmemcheck = [
"dep:wasmtime-wmemcheck",
"wasmtime-cranelift?/wmemcheck",
"wasmtime-winch?/wmemcheck",
"wasmtime-environ/wmemcheck",
"std",
]
[lib]
name = "wasmtime"
path = "src/lib.rs"
[[test]]
name = "custom_signal_handler"
path = "tests/custom_signal_handler.rs"
[[test]]
name = "engine_across_forks"
path = "tests/engine_across_forks.rs"
harness = false
[[test]]
name = "host_segfault"
path = "tests/host_segfault.rs"
harness = false
[[test]]
name = "pooling_alloc_near_oom"
path = "tests/pooling_alloc_near_oom.rs"
harness = false
[[test]]
name = "unload-engine"
path = "tests/unload-engine.rs"
[dependencies.addr2line]
version = "0.25.1"
optional = true
default-features = false
[dependencies.anyhow]
version = "1.0.100"
default-features = false
[dependencies.async-trait]
version = "0.1.89"
optional = true
[dependencies.bitflags]
version = "2.9.4"
[dependencies.bumpalo]
version = "3.11.0"
[dependencies.bytes]
version = "1.10.1"
optional = true
default-features = false
[dependencies.cfg-if]
version = "1.0"
[dependencies.encoding_rs]
version = "0.8.31"
optional = true
[dependencies.futures]
version = "0.3.31"
features = ["alloc"]
optional = true
default-features = false
[dependencies.fxprof-processed-profile]
version = "0.8.1"
optional = true
[dependencies.gimli]
version = "0.32.3"
features = ["read"]
optional = true
default-features = false
[dependencies.hashbrown]
version = "0.15"
features = ["default-hasher"]
default-features = false
[dependencies.indexmap]
version = "2.11.4"
default-features = false
[dependencies.libc]
version = "0.2.177"
default-features = true
[dependencies.log]
version = "0.4.28"
default-features = false
[dependencies.object]
version = "0.37.3"
features = [
"read_core",
"elf",
"unaligned",
]
default-features = false
[dependencies.once_cell]
version = "1.12.0"
optional = true
[dependencies.postcard]
version = "1.1.3"
features = ["alloc"]
default-features = false
[dependencies.pulley-interpreter]
version = "=41.0.2"
[dependencies.rayon]
version = "1.5.3"
optional = true
[dependencies.semver]
version = "1.0.27"
optional = true
default-features = false
[dependencies.serde]
version = "1.0.228"
features = ["alloc"]
default-features = false
[dependencies.serde_derive]
version = "1.0.228"
[dependencies.serde_json]
version = "1.0.80"
optional = true
[dependencies.smallvec]
version = "1.15.1"
features = ["union"]
optional = true
[dependencies.target-lexicon]
version = "0.13.0"
[dependencies.tempfile]
version = "3.23.0"
optional = true
[dependencies.wasm-compose]
version = "0.243.0"
optional = true
[dependencies.wasm-encoder]
version = "0.243.0"
optional = true
[dependencies.wasm-wave]
version = "0.243.0"
optional = true
[dependencies.wasmparser]
version = "0.243.0"
features = ["simd"]
default-features = false
[dependencies.wasmtime-cache]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-cache"
[dependencies.wasmtime-component-macro]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-component-macro"
[dependencies.wasmtime-component-util]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-component-util"
[dependencies.wasmtime-cranelift]
version = "=41.0.2"
features = ["pulley"]
optional = true
package = "wasmtime-internal-cranelift"
[dependencies.wasmtime-environ]
version = "=41.0.2"
[dependencies.wasmtime-fiber]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-fiber"
[dependencies.wasmtime-jit-debug]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-jit-debug"
[dependencies.wasmtime-jit-icache-coherence]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-jit-icache-coherence"
[dependencies.wasmtime-math]
version = "=41.0.2"
package = "wasmtime-internal-math"
[dependencies.wasmtime-slab]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-slab"
[dependencies.wasmtime-unwinder]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-unwinder"
[dependencies.wasmtime-versioned-export-macros]
version = "=41.0.2"
package = "wasmtime-internal-versioned-export-macros"
[dependencies.wasmtime-winch]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-winch"
[dependencies.wasmtime-wmemcheck]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-wmemcheck"
[dependencies.wat]
version = "1.243.0"
optional = true
[dev-dependencies.cranelift-native]
version = "0.128.2"
[dev-dependencies.env_logger]
version = "0.11.5"
[dev-dependencies.libtest-mimic]
version = "0.8.1"
[dev-dependencies.proptest]
version = "1.0.0"
[dev-dependencies.rand]
version = "0.9.2"
features = ["small_rng"]
[dev-dependencies.tempfile]
version = "3.23.0"
[dev-dependencies.tokio]
version = "1.48.0"
features = [
"rt",
"time",
"macros",
"sync",
"rt-multi-thread",
]
[build-dependencies.cc]
version = "1.2.41"
optional = true
[build-dependencies.wasmtime-versioned-export-macros]
version = "=41.0.2"
optional = true
package = "wasmtime-internal-versioned-export-macros"
[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dependencies.ittapi]
version = "0.4.0"
optional = true
[target.'cfg(all(target_arch = "x86_64", target_os = "macos"))'.dependencies.ittapi]
version = "0.4.0"
optional = true
[target.'cfg(all(target_arch = "x86_64", target_os = "windows"))'.dependencies.ittapi]
version = "0.4.0"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.memfd]
version = "0.6.5"
optional = true
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.61.2"
features = [
"Win32_Foundation",
"Win32_System_Kernel",
"Win32_System_Memory",
"Win32_System_Diagnostics_Debug",
"Win32_System_SystemInformation",
"Win32_Storage_FileSystem",
"Win32_Security",
]
optional = true
[target.'cfg(target_vendor = "apple")'.dependencies.mach2]
version = "0.4.2"
optional = true
[target."cfg(unix)".dependencies.rustix]
version = "1.0.8"
features = [
"mm",
"param",
]
optional = true
[lints.clippy]
allow_attributes_without_reason = "warn"
clone_on_copy = "warn"
extra_unused_type_parameters = "warn"
from_over_into = "warn"
manual_strip = "warn"
map_clone = "warn"
multiple_bound_locations = "warn"
redundant_field_names = "warn"
uninlined_format_args = "warn"
unnecessary_cast = "warn"
unnecessary_fallible_conversions = "warn"
unnecessary_mut_passed = "warn"
unnecessary_to_owned = "warn"
useless_conversion = "warn"
[lints.clippy.all]
level = "allow"
priority = -1
[lints.rust]
trivial_numeric_casts = "warn"
unstable_features = "warn"
unused-lifetimes = "warn"
unused-macro-rules = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(pulley_tail_calls)",
"cfg(pulley_assume_llvm_makes_tail_calls)",
"cfg(pulley_disable_interp_simd)",
]