You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

271 lines
8.9 KiB

[package]
name = "wasmtime"
version.workspace = true
authors.workspace = true
description = "High-level API to expose the Wasmtime runtime"
documentation = "https://docs.rs/wasmtime"
license = "Apache-2.0 WITH LLVM-exception"
repository = "https://github.com/bytecodealliance/wasmtime"
readme = "README.md"
edition.workspace = true
rust-version.workspace = true
[lints]
workspace = true
[package.metadata.docs.rs]
all-features = true
[dependencies]
wasmtime-asm-macros = { workspace = true, optional = true }
wasmtime-environ = { workspace = true }
wasmtime-jit-debug = { workspace = true, features = ["gdb_jit_int", "perf_jitdump"], optional = true }
wasmtime-jit-icache-coherence = { workspace = true, optional = true }
wasmtime-cache = { workspace = true, optional = true }
wasmtime-fiber = { workspace = true, optional = true }
wasmtime-cranelift = { workspace = true, optional = true }
wasmtime-winch = { workspace = true, optional = true }
wasmtime-component-macro = { workspace = true, optional = true }
wasmtime-component-util = { workspace = true, optional = true }
wasmtime-slab = { workspace = true, optional = true }
wasmtime-versioned-export-macros = { workspace = true }
wasmtime-wmemcheck = { workspace = true, optional = true }
target-lexicon = { workspace = true }
wasmparser = { workspace = true }
wasm-encoder = { workspace = true, optional = true }
anyhow = { workspace = true }
libc = { workspace = true }
cfg-if = { workspace = true }
log = { workspace = true }
wat = { workspace = true, optional = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true, optional = true }
sptr = { workspace = true }
postcard = { workspace = true }
indexmap = { workspace = true }
paste = "1.0.3"
once_cell = { workspace = true }
rayon = { version = "1.0", optional = true }
object = { workspace = true }
async-trait = { workspace = true, optional = true }
encoding_rs = { version = "0.8.31", optional = true }
bumpalo = "3.11.0"
fxprof-processed-profile = { version = "0.6.0", optional = true }
gimli = { workspace = true, optional = true }
addr2line = { workspace = true, optional = true }
semver = { workspace = true, optional = true }
smallvec = { workspace = true, optional = true }
hashbrown = { workspace = true }
libm = "0.2.7"
bitflags = { workspace = true }
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
workspace = true
optional = true
features = [
"Win32_Foundation",
"Win32_System_Kernel",
"Win32_System_Memory",
"Win32_System_Diagnostics_Debug",
"Win32_System_SystemInformation",
"Win32_Storage_FileSystem",
"Win32_Security",
]
[target.'cfg(all(target_arch = "x86_64", not(target_os = "android")))'.dependencies]
ittapi = { version = "0.4.0", optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
memfd = { workspace = true, optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
mach2 = { workspace = true, optional = true }
[target.'cfg(unix)'.dependencies]
rustix = { workspace = true, optional = true }
[target.'cfg(target_arch = "s390x")'.dependencies]
psm = { workspace = true, optional = true }
[dev-dependencies]
env_logger = { workspace = true }
proptest = { workspace = true }
rand = { workspace = true }
tempfile = { workspace = true }
wasi-common = { path = "../wasi-common", default-features = true }
[build-dependencies]
cc = { workspace = true, optional = true }
wasmtime-versioned-export-macros = { workspace = true, optional = true }
# =============================================================================
#
# Features for the Wasmtime crate.
#
# This section contains the compile-time features of the `wasmtime` crate. These
# features can be used to add more functionality and APIs exposed from the
# crate's API. Most of them are enabled by default. Disabling features can be
# done to cut down on binary size by disabling features that are not required
# for a particular embedding.
[features]
default = [
'async',
'cache',
'gc',
'wat',
'profiling',
'parallel-compilation',
'cranelift',
'pooling-allocator',
'demangle',
'addr2line',
'coredump',
'debug-builtins',
'runtime',
'component-model',
'threads',
'std',
]
# An on-by-default feature enabling runtime compilation of WebAssembly modules
# with the Cranelift compiler. Cranelift is the default compilation backend of
# Wasmtime. If disabled then WebAssembly modules can only be created from
# precompiled WebAssembly modules.
cranelift = ["dep:wasmtime-cranelift", "std"]
# Enables support for winch, the WebAssembly baseline compiler. The Winch compiler
# strategy in `Config` will be available. It is currently in active development
# and shouldn't be used in production applications.
winch = ["dep:wasmtime-winch", "std"]
# Enables support for incremental compilation cache to be enabled in `Config`.
incremental-cache = ["wasmtime-cranelift?/incremental-cache", "std"]
# Enables support for profiling guest modules.
profiling = [
"dep:fxprof-processed-profile",
"dep:wasmtime-jit-debug",
"dep:ittapi",
"dep:rustix",
"rustix/thread",
"dep:serde_json",
"std",
]
# Enables parallel compilation of WebAssembly code.
parallel-compilation = ["dep:rayon", "std"]
# Enables support for automatic cache configuration to be enabled in `Config`.
cache = ["dep:wasmtime-cache", "std"]
# Enables support for "async stores" as well as defining host functions as
# `async fn` and calling functions asynchronously.
async = [
"dep:wasmtime-fiber",
"dep:async-trait",
"wasmtime-component-macro?/async",
"runtime",
"std",
]
# Enables support for the pooling instance allocation strategy
pooling-allocator = ["runtime", "std"]
# Enables support for all architectures in Cranelift, allowing
# cross-compilation using the `wasmtime` crate's API, notably the
# `Engine::precompile_module` function.
all-arch = ["wasmtime-cranelift?/all-arch", "wasmtime-winch?/all-arch"]
# Enables in-progress support for the component model. Note that this feature is
# in-progress, buggy, and incomplete. This is primarily here for internal
# testing purposes.
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",
]
wmemcheck = [
"dep:wasmtime-wmemcheck",
"wasmtime-cranelift?/wmemcheck",
"wasmtime-environ/wmemcheck",
"std",
]
# Enables support for demangling WebAssembly function names at runtime in
# errors such as backtraces.
demangle = ["wasmtime-environ/demangle", "std"]
# Enable support for generating core dumps on traps.
coredump = ["dep:wasm-encoder", "runtime", "std"]
# Export some symbols from the final binary to assist in debugging
# Cranelift-generated code with native debuggers like GDB and LLDB.
debug-builtins = ["dep:wasmtime-jit-debug", "std"]
# Enable support for executing compiled Wasm modules.
runtime = [
"dep:cc",
"dep:smallvec",
"dep:mach2",
"dep:memfd",
"dep:wasmtime-asm-macros",
"dep:wasmtime-jit-icache-coherence",
"dep:wasmtime-slab",
"dep:wasmtime-versioned-export-macros",
"dep:windows-sys",
"dep:psm",
"dep:rustix",
"rustix/mm"
]
# Enable support for garbage collection-related things.
#
# This Cargo feature is required to compile or run Wasm that uses any of the
# following Wasm proposals:
#
# * Reference types: https://github.com/WebAssembly/reference-types/
# * Typed function references: https://github.com/WebAssembly/function-references/
# * Garbage collection: https://github.com/WebAssembly/gc
#
# When a compiler Cargo feature (`cranelift` or `winch`) is enabled, this
# feature gates the ability to compile Wasm that uses those proposals.
#
# When the `runtime` Cargo feature is enabled, this feature gates the ability to
# load and run Wasm that uses those proposals.
gc = ["wasmtime-environ/gc", "wasmtime-cranelift?/gc"]
# Enable runtime support for the WebAssembly threads proposal.
threads = ["wasmtime-cranelift?/threads", "std"]
# Controls whether backtraces will attempt to parse DWARF information in
# WebAssembly modules and components to provide filenames and line numbers in
# stack traces.
addr2line = ["dep:addr2line", "dep:gimli", "std"]
# Enables support for the Rust standard library, enabling APIs that require
# types and traits from Rust's `std` such as `Path` and `Error`.
#
# Many features of the Wasmtime crate implicitly require this `std` feature.
# This will be automatically enabled if necessary.
std = [
'postcard/use-std',
'wasmtime-component-macro?/std',
'wasmtime-environ/std',
'object/std',
'once_cell/std',
]
# Enables support for the `Store::call_hook` API which enables injecting custom
# logic around all entries/exits from WebAssembly. This has a slight performance
# cost for all host functions.
call-hook = []
# Enables support for "memory protection keys" which can be used in conjunction
# with the pooling allocator on x64 to compact linear memory allocations.
memory-protection-keys = ["pooling-allocator"]