[package]
name = "wasmtime-cli"
version.workspace = true
authors.workspace = true
description = "Command-line interface for Wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
documentation = "https://bytecodealliance.github.io/wasmtime/cli.html"
categories = ["wasm"]
keywords = ["webassembly", "wasm"]
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition.workspace = true
default-run = "wasmtime"
rust-version.workspace = true
[package.metadata.binstall]
pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-{target-family}{archive-suffix}"
bin-dir = "wasmtime-v{version}-{target-arch}-{target-family}/{bin}{binary-ext}"
pkg-fmt = "txz"
[package.metadata.binstall.overrides.x86_64-apple-darwin]
pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-macos{archive-suffix}"
bin-dir = "wasmtime-v{version}-{target-arch}-macos/{bin}{binary-ext}"
[package.metadata.binstall.overrides.aarch64-apple-darwin]
pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-macos{archive-suffix}"
bin-dir = "wasmtime-v{version}-{target-arch}-macos/{bin}{binary-ext}"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.x86_64-pc-windows-gnu]
pkg-fmt = "zip"
[package.metadata.binstall.overrides.x86_64-unknown-linux-musl]
pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-musl{archive-suffix}"
bin-dir = "wasmtime-v{version}-{target-arch}-musl/{bin}{binary-ext}"
[lints]
workspace = true
[lib]
doctest = false
[[bin]]
name = "wasmtime"
path = "src/bin/wasmtime.rs"
doc = false
[dependencies]
wasmtime = { workspace = true, features = ['std'] }
wasmtime-cache = { workspace = true, optional = true }
wasmtime-cli-flags = { workspace = true }
wasmtime-cranelift = { workspace = true, optional = true }
wasmtime-environ = { workspace = true }
wasmtime-explorer = { workspace = true, optional = true }
wasmtime-wast = { workspace = true, optional = true }
wasi-common = { workspace = true, default-features = true, features = ["exit", "tokio"], optional = true }
wasmtime-wasi = { workspace = true, default-features = true, optional = true }
wasmtime-wasi-nn = { workspace = true, optional = true }
wasmtime-wasi-config = { workspace = true, optional = true }
wasmtime-wasi-tls = { workspace = true, optional = true }
wasmtime-wasi-keyvalue = { workspace = true, optional = true }
wasmtime-wasi-threads = { workspace = true, optional = true }
wasmtime-wasi-http = { workspace = true, optional = true }
wasmtime-unwinder = { workspace = true }
clap = { workspace = true }
clap_complete = { workspace = true, optional = true }
anyhow = { workspace = true, features = ['std'] }
target-lexicon = { workspace = true }
listenfd = { version = "1.0.0", optional = true }
wat = { workspace = true, optional = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
wasmparser = { workspace = true }
tracing = { workspace = true }
log = { workspace = true }
tempfile = { workspace = true, optional = true }
object = { workspace = true, optional = true }
cranelift-codegen = { workspace = true, optional = true, features = ['disas'] }
capstone = { workspace = true, optional = true }
termcolor = { workspace = true, optional = true }
gimli = { workspace = true, optional = true }
pulley-interpreter = { workspace = true, optional = true }
async-trait = { workspace = true }
bytes = { workspace = true }
cfg-if = { workspace = true }
tokio = { workspace = true, optional = true, features = [ "signal", "macros" ] }
hyper = { workspace = true, optional = true }
http = { workspace = true, optional = true }
http-body-util = { workspace = true, optional = true }
[target.'cfg(unix)'.dependencies]
rustix = { workspace = true, features = ["mm", "process"] }
[dev-dependencies]
wasmtime = { workspace = true, features = ['default', 'winch', 'pulley', 'all-arch', 'call-hook', 'memory-protection-keys', 'component-model-async'] }
env_logger = { workspace = true }
log = { workspace = true }
filecheck = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["rt", "time", "macros", "rt-multi-thread"] }
wast = { workspace = true }
criterion = { workspace = true }
num_cpus = "1.13.0"
memchr = "2.4"
async-trait = { workspace = true }
wat = { workspace = true }
rayon = "1.5.0"
wasmtime-wast = { workspace = true, features = ['component-model'] }
wasmtime-component-util = { workspace = true }
wasmtime-test-util = { workspace = true, features = ['wasmtime-wast', 'component'] }
bstr = "1.6.0"
libc = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
walkdir = { workspace = true }
test-programs-artifacts = { workspace = true }
bytesize = "2.0.1"
wit-component = { workspace = true }
cranelift-filetests = { workspace = true }
cranelift-codegen = { workspace = true, features = ["disas", "trace-log", "timing"] }
cranelift-reader = { workspace = true }
toml = { workspace = true }
similar = { workspace = true }
libtest-mimic = { workspace = true }
capstone = { workspace = true }
object = { workspace = true, features = ['std'] }
wasmtime-test-macros = { path = "crates/test-macros" }
pulley-interpreter = { workspace = true, features = ["disas"] }
wasm-encoder = { workspace = true }
cranelift-native = { workspace = true }
futures = { workspace = true }
[target.'cfg(windows)'.dev-dependencies]
windows-sys = { workspace = true, features = ["Win32_System_Memory"] }
[target.'cfg(unix)'.dev-dependencies]
rustix = { workspace = true, features = ["param"] }
[build-dependencies]
anyhow = { workspace = true, features = ['std'] }
[profile.release.build-override]
opt-level = 0
[workspace]
resolver = '2'
members = [
"cranelift",
"cranelift/assembler-x64/fuzz",
"cranelift/isle/fuzz",
"cranelift/isle/islec",
"cranelift/isle/veri/veri_engine",
"cranelift/isle/veri/veri_ir",
"cranelift/serde",
"crates/bench-api",
"crates/c-api/artifact",
"crates/environ/fuzz",
"crates/misc/component-async-tests",
"crates/test-programs",
"crates/wasi-preview1-component-adapter",
"crates/wasi-preview1-component-adapter/verify",
"crates/wasi-tls-nativetls",
"examples/fib-debug/wasm",
"examples/wasm",
"examples/tokio/wasm",
"examples/component/wasm",
"examples/resource-component/wasm",
"examples/min-platform",
"examples/min-platform/embedding",
"fuzz",
"winch/codegen",
]
exclude = [
'docs/rust_wasi_markdown_parser',
]
[workspace.package]
version = "37.0.0"
authors = ["The Wasmtime Project Developers"]
edition = "2024"
rust-version = "1.87.0"
[workspace.lints.rust]
unused_extern_crates = 'warn'
trivial_numeric_casts = 'warn'
unstable_features = 'warn'
unused_import_braces = 'warn'
unused-lifetimes = 'warn'
unused-macro-rules = 'warn'
[workspace.lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = [
'cfg(pulley_tail_calls)',
'cfg(pulley_assume_llvm_makes_tail_calls)',
'cfg(pulley_disable_interp_simd)',
]
[workspace.lints.clippy]
all = { level = 'allow', priority = -1 }
clone_on_copy = 'warn'
map_clone = 'warn'
uninlined_format_args = 'warn'
unnecessary_to_owned = 'warn'
manual_strip = 'warn'
useless_conversion = 'warn'
unnecessary_mut_passed = 'warn'
unnecessary_fallible_conversions = 'warn'
unnecessary_cast = 'warn'
allow_attributes_without_reason = 'warn'
from_over_into = 'warn'
redundant_field_names = 'warn'
multiple_bound_locations = 'warn'
[workspace.dependencies]
wasmtime = { path = "crates/wasmtime", version = "37.0.0", default-features = false }
wasmtime-cli-flags = { path = "crates/cli-flags", version = "=37.0.0" }
wasmtime-environ = { path = "crates/environ", version = "=37.0.0" }
wasmtime-wasi = { path = "crates/wasi", version = "37.0.0", default-features = false }
wasmtime-wasi-io = { path = "crates/wasi-io", version = "37.0.0", default-features = false }
wasmtime-wasi-http = { path = "crates/wasi-http", version = "37.0.0", default-features = false }
wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "37.0.0" }
wasmtime-wasi-config = { path = "crates/wasi-config", version = "37.0.0" }
wasmtime-wasi-keyvalue = { path = "crates/wasi-keyvalue", version = "37.0.0" }
wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "37.0.0" }
wasmtime-wasi-tls = { path = "crates/wasi-tls", version = "37.0.0" }
wasmtime-wasi-tls-nativetls = { path = "crates/wasi-tls-nativetls", version = "37.0.0" }
wasmtime-wast = { path = "crates/wast", version = "=37.0.0" }
wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=37.0.0", package = 'wasmtime-internal-wmemcheck' }
wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=37.0.0", package = 'wasmtime-internal-c-api-macros' }
wasmtime-cache = { path = "crates/cache", version = "=37.0.0", package = 'wasmtime-internal-cache' }
wasmtime-cranelift = { path = "crates/cranelift", version = "=37.0.0", package = 'wasmtime-internal-cranelift' }
wasmtime-winch = { path = "crates/winch", version = "=37.0.0", package = 'wasmtime-internal-winch' }
wasmtime-explorer = { path = "crates/explorer", version = "=37.0.0", package = 'wasmtime-internal-explorer' }
wasmtime-fiber = { path = "crates/fiber", version = "=37.0.0", package = 'wasmtime-internal-fiber' }
wasmtime-jit-debug = { path = "crates/jit-debug", version = "=37.0.0", package = 'wasmtime-internal-jit-debug' }
wasmtime-component-util = { path = "crates/component-util", version = "=37.0.0", package = 'wasmtime-internal-component-util' }
wasmtime-component-macro = { path = "crates/component-macro", version = "=37.0.0", package = 'wasmtime-internal-component-macro' }
wasmtime-asm-macros = { path = "crates/asm-macros", version = "=37.0.0", package = 'wasmtime-internal-asm-macros' }
wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", version = "=37.0.0", package = 'wasmtime-internal-versioned-export-macros' }
wasmtime-slab = { path = "crates/slab", version = "=37.0.0", package = 'wasmtime-internal-slab' }
wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=37.0.0", package = 'wasmtime-internal-jit-icache-coherence' }
wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=37.0.0", package = 'wasmtime-internal-wit-bindgen' }
wasmtime-math = { path = "crates/math", version = "=37.0.0", package = 'wasmtime-internal-math' }
wasmtime-unwinder = { path = "crates/unwinder", version = "=37.0.0", package = 'wasmtime-internal-unwinder' }
wiggle = { path = "crates/wiggle", version = "=37.0.0", default-features = false }
wiggle-macro = { path = "crates/wiggle/macro", version = "=37.0.0" }
wiggle-generate = { path = "crates/wiggle/generate", version = "=37.0.0" }
wasi-common = { path = "crates/wasi-common", version = "=37.0.0", default-features = false }
pulley-interpreter = { path = 'pulley', version = "=37.0.0" }
pulley-macros = { path = 'pulley/macros', version = "=37.0.0" }
cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.124.0" }
cranelift-codegen = { path = "cranelift/codegen", version = "0.124.0", default-features = false, features = ["std", "unwind"] }
cranelift-frontend = { path = "cranelift/frontend", version = "0.124.0" }
cranelift-entity = { path = "cranelift/entity", version = "0.124.0" }
cranelift-native = { path = "cranelift/native", version = "0.124.0" }
cranelift-module = { path = "cranelift/module", version = "0.124.0" }
cranelift-interpreter = { path = "cranelift/interpreter", version = "0.124.0" }
cranelift-reader = { path = "cranelift/reader", version = "0.124.0" }
cranelift-filetests = { path = "cranelift/filetests" }
cranelift-object = { path = "cranelift/object", version = "0.124.0" }
cranelift-jit = { path = "cranelift/jit", version = "0.124.0" }
cranelift-fuzzgen = { path = "cranelift/fuzzgen" }
cranelift-bforest = { path = "cranelift/bforest", version = "0.124.0" }
cranelift-bitset = { path = "cranelift/bitset", version = "0.124.0" }
cranelift-control = { path = "cranelift/control", version = "0.124.0" }
cranelift-srcgen = { path = "cranelift/srcgen", version = "0.124.0" }
cranelift = { path = "cranelift/umbrella", version = "0.124.0" }
winch-codegen = { path = "winch/codegen", version = "=37.0.0" }
wasi-preview1-component-adapter = { path = "crates/wasi-preview1-component-adapter" }
wasmtime-fuzzing = { path = "crates/fuzzing" }
test-programs-artifacts = { path = 'crates/test-programs/artifacts' }
wasmtime-test-util = { path = "crates/test-util" }
byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-array-literals" }
pulley-interpreter-fuzz = { path = 'pulley/fuzz' }
component-async-tests = { path = "crates/misc/component-async-tests" }
regalloc2 = "0.13.1"
target-lexicon = "0.13.0"
cap-std = "3.4.4"
cap-rand = { version = "3.4.4", features = ["small_rng"] }
cap-fs-ext = "3.4.4"
cap-net-ext = "3.4.4"
cap-time-ext = "3.4.4"
cap-tempfile = "3.4.4"
fs-set-times = "0.20.1"
system-interface = { version = "0.27.1", features = ["cap_std_impls"] }
io-lifetimes = { version = "2.0.3", default-features = false }
io-extras = "0.18.1"
rustix = "1.0.3"
wit-bindgen = { version = "0.43.0", default-features = false }
wit-bindgen-rt = { version = "0.43.0", default-features = false }
wit-bindgen-rust-macro = { version = "0.43.0", default-features = false }
wasmparser = { version = "0.237.0", default-features = false, features = ['simd'] }
wat = "1.237.0"
wast = "237.0.0"
wasmprinter = "0.237.0"
wasm-encoder = "0.237.0"
wasm-smith = "0.237.0"
wasm-mutate = "0.237.0"
wit-parser = "0.237.0"
wit-component = "0.237.0"
wasm-wave = "0.237.0"
wasm-compose = "0.237.0"
json-from-wast = "0.237.0"
arbitrary = "1.4.0"
mutatis = "0.3.2"
cc = "1.0"
object = { version = "0.37.3", default-features = false, features = ['read_core', 'elf'] }
gimli = { version = "0.32.0", default-features = false, features = ['read'] }
addr2line = { version = "0.25.0", default-features = false }
anyhow = { version = "1.0.93", default-features = false }
windows-sys = "0.60.0"
env_logger = "0.11.5"
log = { version = "0.4.27", default-features = false }
clap = { version = "4.5.17", default-features = false, features = ["std", "derive"] }
clap_complete = "4.4.7"
hashbrown = { version = "0.15", default-features = false }
capstone = "0.13.0"
smallvec = { version = "1.6.1", features = ["union"] }
tracing = "0.1.26"
bitflags = "2.0"
thiserror = "2.0.12"
async-trait = "0.1.71"
heck = "0.5"
similar = "2.1.0"
toml = "0.8.10"
mach2 = "0.4.2"
memfd = "0.6.2"
psm = "0.1.11"
proptest = "1.0.0"
rand = { version = "0.9.2", features = ["small_rng"] }
serde = { version = "1.0.215", default-features = false, features = ['alloc'] }
serde_derive = "1.0.188"
serde_json = "1.0.80"
glob = "0.3.0"
libfuzzer-sys = "0.4.8"
walkdir = "2.3.3"
cfg-if = "1.0"
tempfile = "3.1.0"
filecheck = "0.5.0"
libc = { version = "0.2.112", default-features = true }
file-per-thread-logger = "0.2.0"
tokio = { version = "1.43.0", features = [ "rt", "time" ] }
hyper = "1.0.1"
http = "1.0.0"
http-body = "1.0.0"
http-body-util = "0.1.0"
bytes = { version = "1.4", default-features = false }
futures = { version = "0.3.27", default-features = false }
indexmap = { version = "2.0.0", default-features = false }
syn = "2.0.25"
quote = "1.0"
proc-macro2 = "1.0"
test-log = { version = "0.2", default-features = false, features = ["trace"] }
tracing-subscriber = { version = "0.3.1", default-features = false, features = ['fmt', 'env-filter', 'ansi', 'tracing-log'] }
url = "2.3.1"
postcard = { version = "1.0.8", default-features = false, features = ['alloc'] }
criterion = { version = "0.6.0", default-features = false, features = ["html_reports", "rayon"] }
rustc-hash = "2.0.0"
libtest-mimic = "0.8.1"
semver = { version = "1.0.17", default-features = false }
ittapi = "0.4.0"
libm = "0.2.7"
tokio-rustls = "0.25.0"
rustls = "0.22.0"
tokio-native-tls = "0.3.1"
native-tls = "0.2.11"
webpki-roots = "0.26.0"
itertools = "0.14.0"
base64 = "0.22.1"
termcolor = "1.4.1"
flate2 = "1.0.30"
[features]
default = [
"run",
"compile",
"explore",
"serve",
"wast",
"config",
"completion",
"objdump",
"wasi-nn",
"wasi-threads",
"wasi-http",
"wasi-config",
"wasi-keyvalue",
"wasi-tls",
"wat",
"parallel-compilation",
"pooling-allocator",
"cache",
"logging",
"demangle",
"cranelift",
"profiling",
"coredump",
"addr2line",
"debug-builtins",
"component-model",
"threads",
"gc",
"gc-drc",
"gc-null",
"stack-switching",
"winch",
"pulley",
"clap/default",
"clap/wrap_help",
]
all-arch = ["wasmtime/all-arch"]
winch = ["wasmtime/winch"]
wmemcheck = ["wasmtime/wmemcheck"]
trace-log = ["wasmtime/trace-log"]
memory-protection-keys = ["wasmtime-cli-flags/memory-protection-keys"]
profile-pulley = ["wasmtime/profile-pulley"]
component-model-async = [
"wasmtime-cli-flags/component-model-async",
"component-model",
"wasmtime-wasi?/p3",
]
disable-logging = ["log/max_level_off", "tracing/max_level_off"]
wasi-nn = ["dep:wasmtime-wasi-nn"]
wasi-tls = ["dep:wasmtime-wasi-tls"]
wasi-threads = ["dep:wasmtime-wasi-threads", "threads"]
wasi-http = ["component-model", "dep:wasmtime-wasi-http", "dep:tokio", "dep:hyper", "wasmtime-wasi-http/default-send-request"]
wasi-config = ["dep:wasmtime-wasi-config"]
wasi-keyvalue = ["dep:wasmtime-wasi-keyvalue"]
pooling-allocator = ["wasmtime/pooling-allocator", "wasmtime-cli-flags/pooling-allocator"]
component-model = [
"wasmtime/component-model",
"wasmtime-wast?/component-model",
"wasmtime-cli-flags/component-model"
]
wat = ["dep:wat", "wasmtime/wat"]
cache = ["dep:wasmtime-cache", "wasmtime-cli-flags/cache"]
parallel-compilation = ["wasmtime-cli-flags/parallel-compilation"]
logging = ["wasmtime-cli-flags/logging"]
demangle = ["wasmtime/demangle"]
cranelift = ["wasmtime-cli-flags/cranelift", "dep:wasmtime-cranelift"]
profiling = ["wasmtime/profiling", "wasmtime/call-hook"]
coredump = ["wasmtime-cli-flags/coredump"]
addr2line = ["wasmtime/addr2line"]
debug-builtins = ["wasmtime/debug-builtins"]
threads = ["wasmtime-cli-flags/threads"]
gc = ["wasmtime-cli-flags/gc", "wasmtime/gc"]
gc-drc = ["gc", "wasmtime/gc-drc", "wasmtime-cli-flags/gc-drc"]
gc-null = ["gc", "wasmtime/gc-null", "wasmtime-cli-flags/gc-null"]
pulley = ["wasmtime-cli-flags/pulley"]
stack-switching = ["wasmtime/stack-switching", "wasmtime-cli-flags/stack-switching"]
serve = [
"wasi-http",
"component-model",
"dep:http-body-util",
"dep:http",
"wasmtime-cli-flags/async",
]
explore = ["dep:wasmtime-explorer", "dep:tempfile"]
wast = ["dep:wasmtime-wast"]
config = ["cache"]
compile = ["cranelift"]
run = [
"dep:wasmtime-wasi",
"wasmtime/runtime",
"wasmtime/wave",
"dep:listenfd",
"dep:wasi-common",
"dep:tokio",
"wasmtime-cli-flags/async",
]
completion = ["dep:clap_complete"]
objdump = [
'dep:object',
'dep:cranelift-codegen',
'dep:capstone',
'dep:termcolor',
'dep:gimli',
'pulley-interpreter/disas',
]
[[test]]
name = "disas"
harness = false
[[test]]
name = "wast"
harness = false
[[example]]
name = "tokio"
required-features = ["wasi-common/tokio"]
[[bench]]
name = "instantiation"
harness = false
[[bench]]
name = "thread_eager_init"
harness = false
[[bench]]
name = "trap"
harness = false
[[bench]]
name = "call"
harness = false
[[bench]]
name = "wasi"
harness = false
[profile.release.package.wasi-preview1-component-adapter]
opt-level = 's'
strip = 'debuginfo'
[profile.dev.package.wasi-preview1-component-adapter]
incremental = false
opt-level = 's'
debug-assertions = false
overflow-checks = false
[profile.dev.package.wit-bindgen]
incremental = false
debug-assertions = false
overflow-checks = false
opt-level = 's'
[profile.profiling]
inherits = "bench"
debug = "line-tables-only"
[profile.fastest-runtime]
inherits = "release"
codegen-units = 1
lto = true