xref: /wasmtime-44.0.1/Cargo.toml (revision f302ebd6)
1[package]
2name = "wasmtime-cli"
3version.workspace = true
4authors.workspace = true
5description = "Command-line interface for Wasmtime"
6license = "Apache-2.0 WITH LLVM-exception"
7documentation = "https://bytecodealliance.github.io/wasmtime/cli.html"
8categories = ["wasm"]
9keywords = ["webassembly", "wasm"]
10repository = "https://github.com/bytecodealliance/wasmtime"
11readme = "README.md"
12edition.workspace = true
13default-run = "wasmtime"
14rust-version.workspace = true
15
16[package.metadata.binstall]
17pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-{target-family}{archive-suffix}"
18bin-dir = "wasmtime-v{version}-{target-arch}-{target-family}/{bin}{binary-ext}"
19pkg-fmt = "txz"
20[package.metadata.binstall.overrides.x86_64-apple-darwin]
21pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-macos{archive-suffix}"
22bin-dir = "wasmtime-v{version}-{target-arch}-macos/{bin}{binary-ext}"
23[package.metadata.binstall.overrides.aarch64-apple-darwin]
24pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-macos{archive-suffix}"
25bin-dir = "wasmtime-v{version}-{target-arch}-macos/{bin}{binary-ext}"
26[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
27pkg-fmt = "zip"
28[package.metadata.binstall.overrides.x86_64-pc-windows-gnu]
29pkg-fmt = "zip"
30[package.metadata.binstall.overrides.x86_64-unknown-linux-musl]
31pkg-url = "{repo}/releases/download/v{version}/wasmtime-v{version}-{target-arch}-musl{archive-suffix}"
32bin-dir = "wasmtime-v{version}-{target-arch}-musl/{bin}{binary-ext}"
33
34[lints]
35workspace = true
36
37[lib]
38doctest = false
39
40[[bin]]
41name = "wasmtime"
42path = "src/bin/wasmtime.rs"
43doc = false
44
45[dependencies]
46wasmtime = { workspace = true, features = ['std'] }
47wasmtime-cache = { workspace = true, optional = true }
48wasmtime-cli-flags = { workspace = true }
49wasmtime-cranelift = { workspace = true, optional = true }
50wasmtime-environ = { workspace = true }
51wasmtime-explorer = { workspace = true, optional = true }
52wasmtime-wast = { workspace = true, optional = true }
53wasi-common = { workspace = true, default-features = true, features = ["exit", "tokio"], optional = true }
54wasmtime-wasi = { workspace = true, default-features = true, optional = true }
55wasmtime-wasi-nn = { workspace = true, optional = true }
56wasmtime-wasi-config = { workspace = true, optional = true }
57wasmtime-wasi-tls = { workspace = true, optional = true }
58wasmtime-wasi-keyvalue = { workspace = true, optional = true }
59wasmtime-wasi-threads = { workspace = true, optional = true }
60wasmtime-wasi-http = { workspace = true, optional = true }
61wasmtime-unwinder = { workspace = true }
62wasmtime-wizer = { workspace = true, optional = true, features = ['clap', 'wasmtime'] }
63wasmtime-debugger = { workspace = true, optional = true }
64gdbstub-component-artifact = { workspace = true, optional = true }
65clap = { workspace = true }
66clap_complete = { workspace = true, optional = true }
67target-lexicon = { workspace = true }
68listenfd = { version = "1.0.0", optional = true }
69wat = { workspace = true, optional = true }
70serde = { workspace = true }
71serde_derive = { workspace = true }
72serde_json = { workspace = true }
73wasmparser = { workspace = true }
74tracing = { workspace = true, features = ['std'] }
75log = { workspace = true }
76tempfile = { workspace = true, optional = true }
77object = { workspace = true, optional = true }
78cranelift-codegen = { workspace = true, optional = true, features = ['disas'] }
79capstone = { workspace = true, optional = true }
80termcolor = { workspace = true, optional = true }
81gimli = { workspace = true, optional = true }
82pulley-interpreter = { workspace = true, optional = true }
83smallvec = { workspace = true }
84
85async-trait = { workspace = true }
86bytes = { workspace = true }
87cfg-if = { workspace = true }
88tokio = { workspace = true, optional = true, features = [ "signal", "macros" ] }
89hyper = { workspace = true, optional = true }
90http = { workspace = true, optional = true }
91http-body-util = { workspace = true, optional = true }
92futures = { workspace = true, optional = true }
93
94[target.'cfg(unix)'.dependencies]
95rustix = { workspace = true, features = ["mm", "process"] }
96
97[dev-dependencies]
98# depend again on wasmtime to activate its default features for tests
99wasmtime = { workspace = true, features = ['default', 'anyhow', 'winch', 'pulley', 'all-arch', 'call-hook', 'memory-protection-keys', 'component-model-async', 'component-model-async-bytes'] }
100env_logger = { workspace = true }
101log = { workspace = true }
102filecheck = { workspace = true }
103tempfile = { workspace = true }
104tokio = { workspace = true, features = ["rt", "time", "macros", "rt-multi-thread"] }
105wast = { workspace = true }
106criterion = { workspace = true }
107num_cpus = "1.17.0"
108memchr = "2.4"
109async-trait = { workspace = true }
110wat = { workspace = true }
111rayon = "1.5.0"
112wasmtime-wast = { workspace = true, features = ['component-model'] }
113wasmtime-component-util = { workspace = true }
114wasmtime-test-util = { workspace = true, features = ['wasmtime-wast', 'component'] }
115bstr = "1.6.0"
116libc = { workspace = true }
117serde = { workspace = true }
118serde_json = { workspace = true }
119walkdir = { workspace = true }
120test-programs-artifacts = { workspace = true }
121bytesize = "2.0.1"
122wit-component = { workspace = true }
123cranelift-filetests = { workspace = true }
124cranelift-codegen = { workspace = true, features = ["disas", "trace-log", "timing"] }
125cranelift-reader = { workspace = true }
126toml = { workspace = true }
127similar = { workspace = true }
128libtest-mimic = { workspace = true }
129capstone = { workspace = true }
130object = { workspace = true, features = ['std'] }
131wasmtime-test-macros = { path = "crates/test-macros" }
132pulley-interpreter = { workspace = true, features = ["disas"] }
133wasm-encoder = { workspace = true }
134cranelift-native = { workspace = true }
135futures = { workspace = true }
136rand = { workspace = true }
137
138# Should only be used for tests that are explicitly testing `anyhow::Error` and
139# `wasmtime::Error` integration and conversion. Otherwise, always prefer to use
140# `wasmtime::Error`.
141anyhow-for-testing = { workspace = true }
142
143[target.'cfg(windows)'.dev-dependencies]
144windows-sys = { workspace = true, features = ["Win32_System_Memory"] }
145
146[target.'cfg(unix)'.dev-dependencies]
147rustix = { workspace = true, features = ["param"] }
148
149[profile.release.build-override]
150opt-level = 0
151
152[workspace]
153resolver = '2'
154members = [
155  "cranelift",
156  "cranelift/assembler-x64/fuzz",
157  "cranelift/isle/fuzz",
158  "cranelift/isle/islec",
159  "cranelift/isle/veri/veri_engine",
160  "cranelift/isle/veri/veri_ir",
161  "cranelift/serde",
162  "crates/bench-api",
163  "crates/c-api/artifact",
164  "crates/environ/fuzz",
165  "crates/misc/component-async-tests",
166  "crates/test-programs",
167  "crates/wasi-preview1-component-adapter",
168  "crates/wasi-preview1-component-adapter/verify",
169  "crates/debugger",
170  "crates/gdbstub-component",
171  "crates/gdbstub-component/artifact",
172  "crates/wizer/fuzz",
173  "crates/wizer/tests/regex-test",
174  "crates/wizer/benches/regex-bench",
175  "crates/wizer/benches/uap-bench",
176  "examples/fib-debug/wasm",
177  "examples/wasm",
178  "examples/tokio/wasm",
179  "examples/component/wasm",
180  "examples/resource-component/wasm",
181  "examples/min-platform",
182  "examples/min-platform/embedding",
183  "examples/wasip2-plugins",
184  "fuzz",
185  "winch/codegen",
186]
187exclude = [
188  'docs/rust_wasi_markdown_parser',
189]
190
191[workspace.package]
192version = "44.0.1"
193authors = ["The Wasmtime Project Developers"]
194edition = "2024"
195# Wasmtime's current policy is that this number can be no larger than the
196# current stable release of Rust minus 2.
197rust-version = "1.92.0"
198
199[workspace.lints.rust]
200# Turn on some lints which are otherwise allow-by-default in rustc.
201unused_extern_crates = 'warn'
202trivial_numeric_casts = 'warn'
203unstable_features = 'warn'
204unused_import_braces = 'warn'
205unused-lifetimes = 'warn'
206unused-macro-rules = 'warn'
207
208# Don't warn about unknown cfgs for our custom cfgs.
209[workspace.lints.rust.unexpected_cfgs]
210level = "warn"
211check-cfg = [
212  'cfg(pulley_tail_calls)',
213  'cfg(pulley_assume_llvm_makes_tail_calls)',
214  'cfg(pulley_disable_interp_simd)',
215  'cfg(arc_try_new)',
216
217  # When enabled, `cfg(gc_zeal)` activates aggressive GC debugging assertions.
218  'cfg(gc_zeal)',
219]
220
221[workspace.lints.clippy]
222# The default set of lints in Clippy is viewed as "too noisy" right now so
223# they're all turned off by default. Selective lints are then enabled below as
224# necessary.
225all = { level = 'allow', priority = -1 }
226clone_on_copy = 'warn'
227map_clone = 'warn'
228uninlined_format_args = 'warn'
229unnecessary_to_owned = 'warn'
230manual_strip = 'warn'
231useless_conversion = 'warn'
232unnecessary_mut_passed = 'warn'
233unnecessary_fallible_conversions = 'warn'
234unnecessary_cast = 'warn'
235allow_attributes_without_reason = 'warn'
236from_over_into = 'warn'
237redundant_field_names = 'warn'
238multiple_bound_locations = 'warn'
239extra_unused_type_parameters = 'warn'
240
241[workspace.dependencies]
242# Public crates related to Wasmtime.
243#
244# These crates are intended to be depended upon publicly to varying degrees. For
245# example `wasmtime` is very much intended to be used, as well as WASI crates
246# like `wasmtime-wasi`. Crates like `wasmtime-environ` are useful for ecosystem
247# tooling but aren't intended to be widely depended on.
248#
249# All of these crates are supported though in the sense that
250wasmtime = { path = "crates/wasmtime", version = "44.0.1", default-features = false }
251wasmtime-cli-flags = { path = "crates/cli-flags", version = "=44.0.1" }
252wasmtime-environ = { path = "crates/environ", version = "=44.0.1" }
253wasmtime-wasi = { path = "crates/wasi", version = "44.0.1", default-features = false }
254wasmtime-wasi-io = { path = "crates/wasi-io", version = "44.0.1", default-features = false }
255wasmtime-wasi-http = { path = "crates/wasi-http", version = "44.0.1", default-features = false }
256wasmtime-wasi-nn = { path = "crates/wasi-nn", version = "44.0.1" }
257wasmtime-wasi-config = { path = "crates/wasi-config", version = "44.0.1" }
258wasmtime-wasi-keyvalue = { path = "crates/wasi-keyvalue", version = "44.0.1" }
259wasmtime-wasi-threads = { path = "crates/wasi-threads", version = "44.0.1" }
260wasmtime-wasi-tls = { path = "crates/wasi-tls", version = "44.0.1" }
261wasmtime-wast = { path = "crates/wast", version = "=44.0.1" }
262
263# Internal Wasmtime-specific crates.
264#
265# Note that all crates here are actually named `wasmtime-internal-*` as their
266# package name which is what will show up on crates.io. This is done to signal
267# that these are internal unsupported crates for external use. These exist as
268# part of the project organization of other public crates in Wasmtime and are
269# otherwise not supported in terms of CVEs for example.
270wasmtime-core = { path = "crates/core", version = "=44.0.1", package = 'wasmtime-internal-core' }
271wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=44.0.1", package = 'wasmtime-internal-wmemcheck' }
272wasmtime-c-api-macros = { path = "crates/c-api-macros", version = "=44.0.1", package = 'wasmtime-internal-c-api-macros' }
273wasmtime-cache = { path = "crates/cache", version = "=44.0.1", package = 'wasmtime-internal-cache' }
274wasmtime-cranelift = { path = "crates/cranelift", version = "=44.0.1", package = 'wasmtime-internal-cranelift' }
275wasmtime-winch = { path = "crates/winch", version = "=44.0.1", package = 'wasmtime-internal-winch'  }
276wasmtime-explorer = { path = "crates/explorer", version = "=44.0.1", package = 'wasmtime-internal-explorer'  }
277wasmtime-fiber = { path = "crates/fiber", version = "=44.0.1", package = 'wasmtime-internal-fiber' }
278wasmtime-jit-debug = { path = "crates/jit-debug", version = "=44.0.1", package = 'wasmtime-internal-jit-debug' }
279wasmtime-component-util = { path = "crates/component-util", version = "=44.0.1", package = 'wasmtime-internal-component-util' }
280wasmtime-component-macro = { path = "crates/component-macro", version = "=44.0.1", package = 'wasmtime-internal-component-macro' }
281wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", version = "=44.0.1", package = 'wasmtime-internal-versioned-export-macros' }
282wasmtime-jit-icache-coherence = { path = "crates/jit-icache-coherence", version = "=44.0.1", package = 'wasmtime-internal-jit-icache-coherence' }
283wasmtime-wit-bindgen = { path = "crates/wit-bindgen", version = "=44.0.1", package = 'wasmtime-internal-wit-bindgen' }
284wasmtime-unwinder = { path = "crates/unwinder", version = "=44.0.1", package = 'wasmtime-internal-unwinder' }
285wasmtime-debugger = { path = "crates/debugger", version = "=44.0.1", package = "wasmtime-internal-debugger" }
286gdbstub-component-artifact = { path = "crates/gdbstub-component/artifact", version = "=44.0.1", package = "wasmtime-internal-gdbstub-component-artifact" }
287wasmtime-wizer = { path = "crates/wizer", version = "44.0.1" }
288
289# Miscellaneous crates without a `wasmtime-*` prefix in their name but still
290# used in the `wasmtime-*` family of crates depending on various features/etc.
291wiggle = { path = "crates/wiggle", version = "=44.0.1", default-features = false }
292wiggle-macro = { path = "crates/wiggle/macro", version = "=44.0.1" }
293wiggle-generate = { path = "crates/wiggle/generate", version = "=44.0.1" }
294wasi-common = { path = "crates/wasi-common", version = "=44.0.1", default-features = false }
295pulley-interpreter = { path = 'pulley', version = "=44.0.1" }
296pulley-macros = { path = 'pulley/macros', version = "=44.0.1" }
297
298# Cranelift crates in this workspace
299cranelift-assembler-x64 = { path = "cranelift/assembler-x64", version = "0.131.1" }
300cranelift-codegen = { path = "cranelift/codegen", version = "0.131.1", default-features = false, features = ["std", "unwind"] }
301cranelift-frontend = { path = "cranelift/frontend", version = "0.131.1" }
302cranelift-entity = { path = "cranelift/entity", version = "0.131.1" }
303cranelift-native = { path = "cranelift/native", version = "0.131.1" }
304cranelift-module = { path = "cranelift/module", version = "0.131.1" }
305cranelift-interpreter = { path = "cranelift/interpreter", version = "0.131.1" }
306cranelift-reader = { path = "cranelift/reader", version = "0.131.1" }
307cranelift-filetests = { path = "cranelift/filetests" }
308cranelift-object = { path = "cranelift/object", version = "0.131.1" }
309cranelift-jit = { path = "cranelift/jit", version = "0.131.1" }
310cranelift-fuzzgen = { path = "cranelift/fuzzgen" }
311cranelift-bforest = { path = "cranelift/bforest", version = "0.131.1" }
312cranelift-bitset = { path = "cranelift/bitset", version = "0.131.1" }
313cranelift-control = { path = "cranelift/control", version = "0.131.1", default-features = false }
314cranelift-srcgen = { path = "cranelift/srcgen", version = "0.131.1" }
315cranelift = { path = "cranelift/umbrella", version = "0.131.1" }
316
317# Winch crates in this workspace.
318winch-codegen = { path = "winch/codegen", version = "=44.0.1" }
319
320# Internal crates not published to crates.io used in testing, builds, etc
321wasi-preview1-component-adapter = { path = "crates/wasi-preview1-component-adapter" }
322wasmtime-fuzzing = { path = "crates/fuzzing" }
323test-programs-artifacts = { path = 'crates/test-programs/artifacts' }
324wasmtime-test-util = { path = "crates/test-util" }
325byte-array-literals = { path = "crates/wasi-preview1-component-adapter/byte-array-literals" }
326pulley-interpreter-fuzz = { path = 'pulley/fuzz' }
327component-async-tests = { path = "crates/misc/component-async-tests" }
328
329# Bytecode Alliance maintained dependencies:
330# ---------------------------
331regalloc2 = "0.15.0"
332wasip1 = { version = "1.0.0", default-features = false }
333
334# cap-std family:
335target-lexicon = "0.13.0"
336cap-std = "3.4.5"
337cap-rand = { version = "3.4.5", features = ["small_rng"] }
338cap-fs-ext = "3.4.5"
339cap-net-ext = "3.4.5"
340cap-time-ext = "3.4.5"
341cap-tempfile = "3.4.5"
342fs-set-times = "0.20.3"
343system-interface = { version = "0.27.3", features = ["cap_std_impls"] }
344io-lifetimes = { version = "2.0.3", default-features = false }
345io-extras = "0.18.4"
346rustix = "1.0.8"
347# wit-bindgen:
348wit-bindgen = { version = "0.53.0", default-features = false }
349wit-bindgen-rust-macro = { version = "0.53.0", default-features = false }
350
351# wasm-tools family:
352wasmparser = { version = "0.246.1", default-features = false, features = ['simd'] }
353wat = "1.246.1"
354wast = "246.0.1"
355wasmprinter = "0.246.1"
356wasm-encoder = "0.246.1"
357wasm-smith = "0.246.1"
358wasm-mutate = "0.246.1"
359wit-parser = "0.246.1"
360wit-component = "0.246.1"
361wasm-wave = "0.246.1"
362wasm-compose = { version = "0.246.1", default-features = false }
363json-from-wast = "0.246.1"
364
365wstd = "0.6.5"
366wasip2 = "1.0"
367
368# Non-Bytecode Alliance maintained dependencies:
369# --------------------------
370arbitrary = "1.4.2"
371backtrace = "0.3.75"
372bumpalo = "3.20.0"
373mutatis = {version = "0.4.0", features = ["alloc", "derive", "check"] }
374cc = "1.2.41"
375object = { version = "0.39.0", default-features = false, features = ['read_core', 'elf'] }
376gimli = { version = "0.33.0", default-features = false, features = ['read'] }
377addr2line = { version = "0.26.0", default-features = false }
378anyhow = { version = "1.0.100", default-features = false }
379anyhow-for-testing = { package = "anyhow", version = "1.0.100", default-features = false }
380windows-sys = "0.61.2"
381env_logger = "0.11.5"
382log = { version = "0.4.28", default-features = false }
383clap = { version = "4.5.48", default-features = false, features = ["std", "derive"] }
384clap_complete = "4.5.58"
385hashbrown = { version = "0.16", default-features = false }
386capstone = "0.13.0"
387smallvec = { version = "1.15.1", features = ["union"] }
388tracing = { version = "0.1.41", default-features = false }
389bitflags = "2.9.4"
390thiserror = "2.0.17"
391async-trait = "0.1.89"
392heck = "0.5"
393similar = "2.7.0"
394toml = "0.9.8"
395mach2 = "0.4.2"
396memfd = "0.6.5"
397psm = "0.1.11"
398proptest = "1.0.0"
399rand = { version = "0.9.2", features = ["small_rng"] }
400# serde and serde_derive must have the same version
401serde = { version = "1.0.228", default-features = false, features = ['alloc'] }
402serde_derive = "1.0.228"
403serde_json = "1.0.80"
404glob = "0.3.3"
405libfuzzer-sys = "0.4.10"
406walkdir = "2.5.0"
407cfg-if = "1.0"
408tempfile = "3.23.0"
409filecheck = "0.5.0"
410libc = { version = "0.2.177", default-features = true }
411file-per-thread-logger = "0.2.0"
412tokio = { version = "1.48.0", features = [ "rt", "time" ] }
413hyper = "1.7.0"
414http = "1.3.1"
415http-body = "1.0.1"
416http-body-util = "0.1.3"
417bytes = { version = "1.11.1", default-features = false }
418futures = { version = "0.3.31", default-features = false }
419indexmap = { version = "2.11.4", default-features = false }
420syn = "2.0.106"
421quote = "1.0.41"
422proc-macro2 = "1.0.101"
423test-log = { version = "0.2.18", default-features = false, features = ["trace"] }
424tracing-subscriber = { version = "0.3.20", default-features = false, features = ['fmt', 'env-filter', 'ansi', 'tracing-log'] }
425url = "2.5.7"
426postcard = { version = "1.1.3", default-features = false, features = ['alloc'] }
427criterion = { version = "0.7.0", default-features = false, features = ["html_reports", "rayon"] }
428rustc-hash = { version = "2.1.1", default-features = false }
429libtest-mimic = "0.8.1"
430semver = { version = "1.0.27", default-features = false }
431ittapi = "0.4.0"
432libm = "0.2.16"
433tokio-rustls = { version = "0.26.4", default-features = false, features = ["ring", "tls12", "logging"] }
434rustls = { version = "0.23", default-features = false, features = ["ring", "tls12", "logging"] }
435tokio-native-tls = "0.3.1"
436native-tls = "0.2.11"
437tokio-openssl = "0.6.5"
438openssl = "0.10.73"
439openssl-sys = "0.9.109"
440webpki-roots = "0.26.0"
441itertools = "0.14.0"
442base64 = "0.22.1"
443termcolor = "1.4.1"
444flate2 = "1.1.4"
445tokio-util = "0.7.16"
446arbtest = "0.3.2"
447rayon = "1.5.3"
448regex = "1.9.1"
449pin-project-lite = "0.2.14"
450sha2 = { version = "0.10.2", default-features = false }
451gdbstub = "0.7.10"
452gdbstub_arch = "0.3.3"
453
454# =============================================================================
455#
456# Features for the Wasmtime CLI executable
457#
458#
459# Note that many of these features are inherited from Wasmtime itself or
460# otherwise configure the `wasmtime` crate's execution. Features are provided as
461# compile-time switches to disable functionality primarily if one is interested
462# in configuring binary size and or exploring the binary size implications of
463# various features. Most features are enabled by default but most embeddings
464# likely won't need all features.
465#
466# When adding or removing a feature, make sure to keep the C API in sync by
467# modifying locations marked WASMTIME_FEATURE_LIST
468[features]
469default = [
470  # All subcommands are included by default.
471  "run",
472  "compile",
473  "explore",
474  "serve",
475  "wast",
476  "config",
477  "completion",
478  "objdump",
479  "wizer",
480
481  # On-by-default WASI features
482  "wasi-nn",
483  "wasi-threads",
484  "wasi-http",
485  "wasi-config",
486  "wasi-keyvalue",
487  "wasi-tls",
488
489  # Most features of Wasmtime are enabled by default.
490  "backtrace",
491  "wat",
492  "parallel-compilation",
493  "pooling-allocator",
494  "cache",
495  "logging",
496  "demangle",
497  "cranelift",
498  "profiling",
499  "coredump",
500  "addr2line",
501  "debug-builtins",
502  "component-model",
503  "component-model-async",
504  "threads",
505  "gc",
506  "gc-drc",
507  "gc-null",
508  "stack-switching",
509  "winch",
510  "pulley",
511  "debug",
512
513  # Enable some nice features of clap by default, but they come at a binary size
514  # cost, so allow disabling this through disabling of our own `default`
515  # feature.
516  "clap/default",
517  "clap/wrap_help",
518]
519
520# ========================================
521# Off-by-default features
522#
523# These features are off-by-default but may optionally be enabled.
524all-arch = ["wasmtime/all-arch"]
525winch = ["wasmtime/winch"]
526wmemcheck = ["wasmtime/wmemcheck"]
527trace-log = ["wasmtime/trace-log"]
528memory-protection-keys = ["wasmtime-cli-flags/memory-protection-keys"]
529profile-pulley = ["wasmtime/profile-pulley"]
530component-model-async = [
531  "wasmtime-cli-flags/component-model-async",
532  "component-model",
533  "wasmtime-wasi?/p3",
534  "wasmtime-wasi-http?/p3",
535  "wasmtime-wasi-tls?/p3",
536  "dep:futures",
537]
538rr = ["wasmtime/rr", "component-model", "wasmtime-cli-flags/rr", "run"]
539
540# Enabled in release builds. We cannot enable the built-in gdbstub component in
541# the default build because the published-to-crates.io crates cannot build the
542# artifact (a limitation caused by lack of artifact dependencies).
543gdbstub = ["debug", "dep:gdbstub-component-artifact"]
544
545# This feature, when enabled, will statically compile out all logging statements
546# throughout Wasmtime and its dependencies.
547disable-logging = ["log/max_level_off", "tracing/max_level_off"]
548
549# ========================================
550# On-by-default features
551#
552# These features are all included in the `default` set above and this is
553# the internal mapping for what they enable in Wasmtime itself.
554wasi-nn = ["dep:wasmtime-wasi-nn"]
555wasi-tls = ["dep:wasmtime-wasi-tls"]
556wasi-threads = ["dep:wasmtime-wasi-threads", "threads"]
557wasi-http = ["component-model", "dep:wasmtime-wasi-http", "dep:tokio", "dep:hyper", "wasmtime-wasi-http/default-send-request"]
558wasi-config = ["dep:wasmtime-wasi-config"]
559wasi-keyvalue = ["dep:wasmtime-wasi-keyvalue"]
560pooling-allocator = ["wasmtime/pooling-allocator", "wasmtime-cli-flags/pooling-allocator"]
561backtrace = ["wasmtime/backtrace"]
562component-model = [
563  "wasmtime/component-model",
564  "wasmtime-wast?/component-model",
565  "wasmtime-cli-flags/component-model",
566  "wasmtime-wizer?/component-model",
567]
568wat = ["dep:wat", "wasmtime/wat"]
569cache = ["dep:wasmtime-cache", "wasmtime-cli-flags/cache"]
570parallel-compilation = ["wasmtime-cli-flags/parallel-compilation"]
571logging = ["wasmtime-cli-flags/logging"]
572demangle = ["wasmtime/demangle"]
573cranelift = ["wasmtime-cli-flags/cranelift", "dep:wasmtime-cranelift"]
574profiling = ["wasmtime/profiling", "wasmtime/call-hook"]
575coredump = ["wasmtime-cli-flags/coredump"]
576addr2line = ["wasmtime/addr2line"]
577debug-builtins = ["wasmtime/debug-builtins"]
578threads = ["wasmtime-cli-flags/threads"]
579gc = ["wasmtime-cli-flags/gc", "wasmtime/gc"]
580gc-drc = ["gc", "wasmtime/gc-drc", "wasmtime-cli-flags/gc-drc"]
581gc-null = ["gc", "wasmtime/gc-null", "wasmtime-cli-flags/gc-null"]
582pulley = ["wasmtime-cli-flags/pulley"]
583stack-switching = ["wasmtime/stack-switching", "wasmtime-cli-flags/stack-switching"]
584debug = ["wasmtime-cli-flags/debug", "wasmtime/debug", "component-model"]
585
586# CLI subcommands for the `wasmtime` executable. See `wasmtime $cmd --help`
587# for more information on each subcommand.
588serve = [
589  "wasi-http",
590  "wasmtime-wasi-http/component-model-async",
591  "component-model",
592  "dep:http-body-util",
593  "dep:http",
594  "wasmtime-cli-flags/async",
595  "wasmtime-wasi-http?/p2",
596]
597explore = ["dep:wasmtime-explorer", "dep:tempfile"]
598wast = ["dep:wasmtime-wast"]
599config = ["cache"]
600compile = ["cranelift"]
601run = [
602  "dep:wasmtime-wasi",
603  "wasmtime/runtime",
604  "wasmtime/wave",
605  "dep:listenfd",
606  "dep:wasi-common",
607  "dep:tokio",
608  "wasmtime-cli-flags/async",
609  "wasmtime-wasi-http?/p2",
610  "dep:wasmtime-debugger",
611]
612completion = ["dep:clap_complete"]
613objdump = [
614  'dep:object',
615  'dep:cranelift-codegen',
616  'dep:capstone',
617  'dep:termcolor',
618  'dep:gimli',
619  'pulley-interpreter/disas',
620]
621wizer = [
622  "wasmtime-wizer",
623  "dep:wasmtime-wasi",
624  "dep:wasi-common",
625  "dep:tokio",
626  "wasmtime/wave",
627]
628
629[[test]]
630name = "disas"
631harness = false
632
633[[test]]
634name = "wast"
635harness = false
636
637[[test]]
638name = "wasi"
639harness = false
640
641[[example]]
642name = "tokio"
643required-features = ["wasi-common/tokio"]
644
645[[bench]]
646name = "compile"
647harness = false
648
649[[bench]]
650name = "compile_time_builtins"
651harness = false
652
653[[bench]]
654name = "instantiation"
655harness = false
656
657[[bench]]
658name = "thread_eager_init"
659harness = false
660
661[[bench]]
662name = "trap"
663harness = false
664
665[[bench]]
666name = "call"
667harness = false
668
669[[bench]]
670name = "wasi"
671harness = false
672
673[profile.release.package.wasi-preview1-component-adapter]
674opt-level = 's'
675strip = 'debuginfo'
676
677[profile.dev.package.wasi-preview1-component-adapter]
678# Make dev look like a release build since this adapter module won't work with
679# a debug build that uses data segments and such.
680incremental = false
681opt-level = 's'
682# Omit assertions, which include failure messages which require string
683# initializers.
684debug-assertions = false
685# Omit integer overflow checks, which include failure messages which require
686# string initializers.
687overflow-checks = false
688
689# Same as `wasi-preview1-component-adapter` above
690[profile.dev.package.wit-bindgen]
691incremental = false
692debug-assertions = false
693overflow-checks = false
694opt-level = 's'
695
696# FIXME(tokio-rs/tokio#8062): once that gets merged, published, and updated here
697# then this can be removed. Otherwise this is causing spurious failures on CI at
698# this time.
699[profile.dev.package.tokio]
700overflow-checks = false
701
702[profile.profiling]
703inherits = "bench"
704debug = "line-tables-only"
705
706[profile.fastest-runtime]
707inherits = "release"
708codegen-units = 1
709lto = true
710
711# https://github.com/crate-ci/typos/blob/master/docs/reference.md
712[workspace.metadata.typos.default]
713extend-ignore-re = [
714    "(\\d\\w{2,}|\\w{2,}\\d)", # possible hex encoding
715]
716extend-ignore-words-re = [
717    '^[a-zA-Z]{1,3}$' # ignore words up to length 3
718]
719
720extend-ignore-identifiers-re = [
721    # prologue, main, epilogue
722    "set[pme]",
723]
724
725[workspace.metadata.typos.default.extend-identifiers]
726# Arithmetic Logic Unit
727alu = "alu"
728# Data Source
729datas = "datas"
730# library
731flate2 = "flate2"
732ExpandedOrShrinked = "ExpandedOrShrinked"
733EigthMem = "EigthMem"
734
735[workspace.metadata.typos.default.extend-words]
736# Vector ALU
737valu = "valu"
738# AND Shifted
739ANDS = "ANDS"
740# Posix EACCES error
741ACCES = "ACCES"
742# SHift Left Long
743shll = "shll"
744# elements
745eles = "eles"
746# strategy
747strat = "strat"
748# test
749thre = "thre"
750# gimli definition
751endianity = "endianity"
752# A Low
753alow = "alow"
754aranges = "aranges"
755# literals
756lits = "lits"
757RELA = "RELA"
758fpr = "fpr"
759
760[workspace.metadata.typos.files]
761extend-exclude = [ "docs/js/mermaid*.js", "crates/wasi-nn/**/*.txt", "*.isle" ]
762