Files
wasmtime/crates/wasmtime/Cargo.toml
Alex Crichton 57dca934ad Upgrade wasm-tools crates, namely the component model (#4715)
* Upgrade wasm-tools crates, namely the component model

This commit pulls in the latest versions of all of the `wasm-tools`
family of crates. There were two major changes that happened in
`wasm-tools` in the meantime:

* bytecodealliance/wasm-tools#697 - this commit introduced a new API for
  more efficiently reading binary operators from a wasm binary. The old
  `Operator`-based reading was left in place, however, and continues to
  be what Wasmtime uses. I hope to update Wasmtime in a future PR to use
  this new API, but for now the biggest change is...

* bytecodealliance/wasm-tools#703 - this commit was a major update to
  the component model AST. This commit almost entirely deals with the
  fallout of this change.

The changes made to the component model were:

1. The `unit` type no longer exists. This was generally a simple change
   where the `Unit` case in a few different locations were all removed.
2. The `expected` type was renamed to `result`. This similarly was
   relatively lightweight and mostly just a renaming on the surface. I
   took this opportunity to rename `val::Result` to `val::ResultVal` and
   `types::Result` to `types::ResultType` to avoid clashing with the
   standard library types. The `Option`-based types were handled with
   this as well.
3. The payload type of `variant` and `result` types are now optional.
   This affected many locations that calculate flat type
   representations, ABI information, etc. The `#[derive(ComponentType)]`
   macro now specifically handles Rust-defined `enum` types which have
   no payload to the equivalent in the component model.
4. Functions can now return multiple parameters. This changed the
   signature of invoking component functions because the return value is
   now bound by `ComponentNamedList` (renamed from `ComponentParams`).
   This had a large effect in the tests, fuzz test case generation, etc.
5. Function types with 2-or-more parameters/results must uniquely name
   all parameters/results. This mostly affected the text format used
   throughout the tests.

I haven't added specifically new tests for multi-return but I changed a
number of tests to use it. Additionally I've updated the fuzzers to all
exercise multi-return as well so I think we should get some good
coverage with that.

* Update version numbers

* Use crates.io
2022-08-17 16:17:34 +00:00

125 lines
4.3 KiB
TOML

[package]
name = "wasmtime"
version = "0.41.0"
authors = ["The Wasmtime Project Developers"]
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 = "2021"
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "nightlydoc"]
[dependencies]
wasmtime-runtime = { path = "../runtime", version = "=0.41.0" }
wasmtime-environ = { path = "../environ", version = "=0.41.0" }
wasmtime-jit = { path = "../jit", version = "=0.41.0" }
wasmtime-cache = { path = "../cache", version = "=0.41.0", optional = true }
wasmtime-fiber = { path = "../fiber", version = "=0.41.0", optional = true }
wasmtime-cranelift = { path = "../cranelift", version = "=0.41.0", optional = true }
wasmtime-component-macro = { path = "../component-macro", version = "=0.41.0", optional = true }
wasmtime-component-util = { path = "../component-util", version = "=0.41.0", optional = true }
target-lexicon = { version = "0.12.0", default-features = false }
wasmparser = "0.89.0"
anyhow = "1.0.19"
libc = "0.2"
cfg-if = "1.0"
log = "0.4.8"
wat = { version = "1.0.47", 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 = "1.12.0"
rayon = { version = "1.0", optional = true }
object = { version = "0.29", default-features = false, features = ['read_core', 'elf'] }
async-trait = { version = "0.1.51", optional = true }
encoding_rs = { version = "0.8.31", optional = true }
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.36.0"
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",
]