Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 56 additions & 90 deletions Cargo.lock

Large diffs are not rendered by default.

127 changes: 90 additions & 37 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ 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 }
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 }
Expand Down Expand Up @@ -82,22 +85,36 @@ 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" ] }
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 }
tracing-subscriber.workspace = true

[target.'cfg(unix)'.dependencies]
rustix = { workspace = true, features = ["mm", "process"] }

[dev-dependencies]
# depend again on wasmtime to activate its default features for tests
wasmtime = { workspace = true, features = ['default', 'winch', 'pulley', 'all-arch', 'call-hook', 'memory-protection-keys', 'component-model-async'] }
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"] }
tokio = { workspace = true, features = [
"rt",
"time",
"macros",
"rt-multi-thread",
] }
wast = { workspace = true }
criterion = { workspace = true }
num_cpus = "1.13.0"
Expand All @@ -107,7 +124,10 @@ 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'] }
wasmtime-test-util = { workspace = true, features = [
'wasmtime-wast',
'component',
] }
bstr = "1.6.0"
libc = { workspace = true }
serde = { workspace = true }
Expand All @@ -117,7 +137,11 @@ 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-codegen = { workspace = true, features = [
"disas",
"trace-log",
"timing",
] }
cranelift-reader = { workspace = true }
toml = { workspace = true }
similar = { workspace = true }
Expand Down Expand Up @@ -170,9 +194,7 @@ members = [
"fuzz",
"winch/codegen",
]
exclude = [
'docs/rust_wasi_markdown_parser',
]
exclude = ['docs/rust_wasi_markdown_parser']

[workspace.package]
version = "37.0.0"
Expand Down Expand Up @@ -253,8 +275,8 @@ wasmtime-wmemcheck = { path = "crates/wmemcheck", version = "=37.0.0", package =
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-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' }
Expand All @@ -264,7 +286,7 @@ wasmtime-versioned-export-macros = { path = "crates/versioned-export-macros", ve
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-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' }

# Miscellaneous crates without a `wasmtime-*` prefix in their name but still
Expand All @@ -278,7 +300,10 @@ pulley-macros = { path = 'pulley/macros', version = "=37.0.0" }

# Cranelift crates in this workspace
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-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" }
Expand Down Expand Up @@ -325,37 +350,45 @@ io-lifetimes = { version = "2.0.3", default-features = false }
io-extras = "0.18.1"
rustix = "1.0.3"
# wit-bindgen:
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 }
wit-bindgen = { version = "0.43.0", path = "../wit-bindgen/crates/guest-rust", default-features = false }
wit-bindgen-rt = { version = "0.43.0", path = "../wit-bindgen/crates/guest-rust/rt", default-features = false }
wit-bindgen-rust-macro = { version = "0.43.0", path = "../wit-bindgen/crates/guest-rust/macro", default-features = false }

# wasm-tools family:
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"
wasmparser = { path = "../wasm-tools/crates/wasmparser", default-features = false, features = [
'simd',
] }
wat = { path = "../wasm-tools/crates/wat" }
wast = { path = "../wasm-tools/crates/wast" }
wasmprinter = { path = "../wasm-tools/crates/wasmprinter" }
wasm-encoder = { path = "../wasm-tools/crates/wasm-encoder" }
wasm-smith = { path = "../wasm-tools/crates/wasm-smith" }
wasm-mutate = { path = "../wasm-tools/crates/wasm-mutate" }
wit-parser = { path = "../wasm-tools/crates/wit-parser" }
wit-component = { path = "../wasm-tools/crates/wit-component" }
wasm-wave = { path = "../wasm-tools/crates/wasm-wave" }
wasm-compose = { path = "../wasm-tools/crates/wasm-compose" }
json-from-wast = { path = "../wasm-tools/crates/json-from-wast" }

# Non-Bytecode Alliance maintained dependencies:
# --------------------------
arbitrary = "1.4.0"
mutatis = "0.3.2"
cc = "1.0"
object = { version = "0.37.3", default-features = false, features = ['read_core', 'elf'] }
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 = { 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"
Expand Down Expand Up @@ -384,7 +417,7 @@ 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" ] }
tokio = { version = "1.43.0", features = ["rt", "time"] }
hyper = "1.0.1"
http = "1.0.0"
http-body = "1.0.0"
Expand All @@ -396,10 +429,18 @@ 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'] }
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"] }
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 }
Expand Down Expand Up @@ -505,14 +546,23 @@ 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-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"]
pooling-allocator = [
"wasmtime/pooling-allocator",
"wasmtime-cli-flags/pooling-allocator",
]
component-model = [
"wasmtime/component-model",
"wasmtime-wast?/component-model",
"wasmtime-cli-flags/component-model"
"wasmtime-cli-flags/component-model",
]
wat = ["dep:wat", "wasmtime/wat"]
cache = ["dep:wasmtime-cache", "wasmtime-cli-flags/cache"]
Expand All @@ -529,7 +579,10 @@ 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"]
stack-switching = [
"wasmtime/stack-switching",
"wasmtime-cli-flags/stack-switching",
]

# CLI subcommands for the `wasmtime` executable. See `wasmtime $cmd --help`
# for more information on each subcommand.
Expand Down
12 changes: 4 additions & 8 deletions crates/cli-flags/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,9 @@ wasmtime_option_group! {
pub component_model: Option<bool>,
/// Component model support for async lifting/lowering.
pub component_model_async: Option<bool>,
/// Component model support for async lifting/lowering: this corresponds
/// to the 🚝 emoji in the component model specification.
pub component_model_async_builtins: Option<bool>,
/// Component model support for async lifting/lowering: this corresponds
/// to the 🚟 emoji in the component model specification.
pub component_model_async_stackful: Option<bool>,
/// Component model support for threading: this corresponds
/// to the 🧵 emoji in the component model specification.
pub component_model_threading: Option<bool>,
/// Component model support for `error-context`: this corresponds
/// to the 📝 emoji in the component model specification.
pub component_model_error_context: Option<bool>,
Expand Down Expand Up @@ -1050,8 +1047,7 @@ impl CommonOptions {
handle_conditionally_compiled! {
("component-model", component_model, wasm_component_model)
("component-model-async", component_model_async, wasm_component_model_async)
("component-model-async", component_model_async_builtins, wasm_component_model_async_builtins)
("component-model-async", component_model_async_stackful, wasm_component_model_async_stackful)
("component-model-async", component_model_threading, wasm_component_model_threading)
("component-model", component_model_error_context, wasm_component_model_error_context)
("threads", threads, wasm_threads)
("gc", gc, wasm_gc)
Expand Down
6 changes: 3 additions & 3 deletions crates/component-macro/src/bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fn select_world(
world: Option<&str>,
) -> anyhow::Result<WorldId> {
if pkgs.len() == 1 {
resolve.select_world(pkgs[0], world)
resolve.select_world(pkgs, world)
} else {
assert!(!pkgs.is_empty());
match world {
Expand All @@ -248,12 +248,12 @@ fn select_world(

// This will ignore the package argument due to the fully
// qualified name being used.
resolve.select_world(pkgs[0], world)
resolve.select_world(pkgs, world)
}
None => {
let worlds = pkgs
.iter()
.filter_map(|p| resolve.select_world(*p, None).ok())
.filter_map(|p| resolve.select_world(pkgs, None).ok())
.collect::<Vec<_>>();
match &worlds[..] {
[] => anyhow::bail!("no packages have a world"),
Expand Down
Loading