* Leverage Cargo's workspace inheritance feature This commit is an attempt to reduce the complexity of the Cargo manifests in this repository with Cargo's workspace-inheritance feature becoming stable in Rust 1.64.0. This feature allows specifying fields in the root workspace `Cargo.toml` which are then reused throughout the workspace. For example this PR shares definitions such as: * All of the Wasmtime-family of crates now use `version.workspace = true` to have a single location which defines the version number. * All crates use `edition.workspace = true` to have one default edition for the entire workspace. * Common dependencies are listed in `[workspace.dependencies]` to avoid typing the same version number in a lot of different places (e.g. the `wasmparser = "0.89.0"` is now in just one spot. Currently the workspace-inheritance feature doesn't allow having two different versions to inherit, so all of the Cranelift-family of crates still manually specify their version. The inter-crate dependencies, however, are shared amongst the root workspace. This feature can be seen as a method of "preprocessing" of sorts for Cargo manifests. This will help us develop Wasmtime but shouldn't have any actual impact on the published artifacts -- everything's dependency lists are still the same. * Fix wasi-crypto tests
125 lines
4.1 KiB
TOML
125 lines
4.1 KiB
TOML
[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
|
|
|
|
[package.metadata.docs.rs]
|
|
rustdoc-args = ["--cfg", "nightlydoc"]
|
|
|
|
[dependencies]
|
|
wasmtime-runtime = { workspace = true }
|
|
wasmtime-environ = { workspace = true }
|
|
wasmtime-jit = { workspace = true }
|
|
wasmtime-cache = { workspace = true, optional = true }
|
|
wasmtime-fiber = { workspace = true, optional = true }
|
|
wasmtime-cranelift = { workspace = true, optional = true }
|
|
wasmtime-component-macro = { workspace = true, optional = true }
|
|
wasmtime-component-util = { workspace = true, optional = true }
|
|
target-lexicon = { workspace = true }
|
|
wasmparser = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
libc = "0.2"
|
|
cfg-if = "1.0"
|
|
log = { workspace = true }
|
|
wat = { workspace = true, optional = true }
|
|
serde = { version = "1.0.94", features = ["derive"] }
|
|
bincode = "1.2.1"
|
|
indexmap = "1.6"
|
|
paste = "1.0.3"
|
|
psm = "0.1.11"
|
|
once_cell = { workspace = true }
|
|
rayon = { version = "1.0", optional = true }
|
|
object = { workspace = true }
|
|
async-trait = { version = "0.1.51", optional = true }
|
|
encoding_rs = { version = "0.8.31", optional = true }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
|
|
workspace = true
|
|
features = [
|
|
"Win32_System_Diagnostics_Debug",
|
|
]
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3.0"
|
|
wasmtime-wasi = { path = "../wasi" }
|
|
wasi-cap-std-sync = { path = "../wasi-common/cap-std-sync" }
|
|
|
|
[badges]
|
|
maintenance = { status = "actively-developed" }
|
|
|
|
[features]
|
|
default = [
|
|
'async',
|
|
'cache',
|
|
'wat',
|
|
'jitdump',
|
|
'parallel-compilation',
|
|
'cranelift',
|
|
'pooling-allocator',
|
|
'memory-init-cow',
|
|
'vtune',
|
|
]
|
|
|
|
# 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"]
|
|
|
|
# Enables support for incremental compilation cache to be enabled in `Config`.
|
|
incremental-cache = ["wasmtime-cranelift?/incremental-cache"]
|
|
|
|
# Enables support for the `perf` jitdump profiler
|
|
jitdump = ["wasmtime-jit/jitdump"]
|
|
|
|
# Enables support for the `VTune` profiler
|
|
vtune = ["wasmtime-jit/vtune"]
|
|
|
|
# Enables parallel compilation of WebAssembly code.
|
|
parallel-compilation = ["dep:rayon"]
|
|
|
|
# Enables support for automatic cache configuration to be enabled in `Config`.
|
|
cache = ["dep:wasmtime-cache"]
|
|
|
|
# Enables support for "async stores" as well as defining host functions as
|
|
# `async fn` and calling functions asynchronously.
|
|
async = ["dep:wasmtime-fiber", "wasmtime-runtime/async", "dep:async-trait"]
|
|
|
|
# Enables support for the pooling instance allocation strategy
|
|
pooling-allocator = ["wasmtime-runtime/pooling-allocator"]
|
|
|
|
# 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"]
|
|
|
|
# Enables trap handling using POSIX signals instead of Mach exceptions on MacOS.
|
|
# It is useful for applications that do not bind their own exception ports and
|
|
# need portable signal handling.
|
|
posix-signals-on-macos = ["wasmtime-runtime/posix-signals-on-macos"]
|
|
|
|
# Enables, on supported platforms, the usage of copy-on-write initialization of
|
|
# compatible linear memories. For more information see the documentation of
|
|
# `Config::memory_init_cow`.
|
|
#
|
|
# Enabling this feature has no effect on unsupported platforms.
|
|
memory-init-cow = ["wasmtime-runtime/memory-init-cow"]
|
|
|
|
# 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-runtime/component-model",
|
|
"dep:wasmtime-component-macro",
|
|
"dep:wasmtime-component-util",
|
|
"dep:encoding_rs",
|
|
]
|