A lightweight WebAssembly runtime that is fast, secure, and standards-compliant
Update wit-bindgen dependency (#13588)
Alex Crichton60519de8736e
diff --git a/Cargo.lock b/Cargo.lockindex ae5f8fab29..f5e04383bc 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1299,7 +1299,7 @@ dependencies = [name = "example-component-wasm"version = "0.0.0"dependencies = [- "wit-bindgen 0.57.0",+ "wit-bindgen 0.58.0",][[package]]@@ -1310,7 +1310,7 @@ version = "0.0.0"name = "example-resource-component-wasm"version = "0.1.0"dependencies = [- "wit-bindgen 0.57.0",+ "wit-bindgen 0.58.0",][[package]]@@ -3705,7 +3705,7 @@ dependencies = ["wasi-nn","wasip1","wasip2",- "wit-bindgen 0.57.0",+ "wit-bindgen 0.58.0",][[package]]@@ -4268,7 +4268,7 @@ dependencies = ["object 0.39.0","wasip1","wasm-encoder 0.251.0",- "wit-bindgen-rust-macro 0.57.0",+ "wit-bindgen-rust-macro 0.58.0",][[package]]@@ -4322,16 +4322,6 @@ dependencies = ["wasmparser 0.244.0",]-[[package]]-name = "wasm-encoder"-version = "0.247.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "30b6733b8b91d010a6ac5b0fb237dc46a19650bc4c67db66857e2e787d437204"-dependencies = [- "leb128fmt",- "wasmparser 0.247.0",-]-[[package]]name = "wasm-encoder"version = "0.251.0"@@ -4354,18 +4344,6 @@ dependencies = ["wasmparser 0.244.0",]-[[package]]-name = "wasm-metadata"-version = "0.247.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "665fe59e56cc9b419ca6fcca56673e3421d1a5011e3b65caf6b726fd9e041d10"-dependencies = [- "anyhow",- "indexmap 2.14.0",- "wasm-encoder 0.247.0",- "wasmparser 0.247.0",-]-[[package]]name = "wasm-metadata"version = "0.251.0"@@ -4489,18 +4467,6 @@ dependencies = ["semver",]-[[package]]-name = "wasmparser"-version = "0.247.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8e6fb4c2bee46c5ea4d40f8cdb5c131725cd976718ec56f1c8e82fbde5fa2a80"-dependencies = [- "bitflags 2.11.1",- "hashbrown 0.17.0",- "indexmap 2.14.0",- "semver",-]-[[package]]name = "wasmparser"version = "0.251.0"@@ -4979,7 +4945,7 @@ dependencies = ["gdbstub_arch","log","wasip2",- "wit-bindgen 0.57.0",+ "wit-bindgen 0.58.0","wstd",]@@ -5593,13 +5559,13 @@ dependencies = [[[package]]name = "wit-bindgen"-version = "0.57.0"+version = "0.58.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "b5be608857dbf30f78c4c543b8e4fc5a3fbc1efb44852a04fb6e0844f6d0d8b8"+checksum = "a43552cfa071f246cfd99e5dbb23710dfe7336b3259e09339818483359470749"dependencies = ["bitflags 2.11.1","futures",- "wit-bindgen-rust-macro 0.57.0",+ "wit-bindgen-rust-macro 0.58.0",][[package]]@@ -5615,13 +5581,13 @@ dependencies = [[[package]]name = "wit-bindgen-core"-version = "0.57.0"+version = "0.58.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "6cf43313f2252c2df0757a675825a6afb8bfaae8487a720f0a728d4a042f2b1e"+checksum = "4738d1c9a78e97bc7f664bfafd5d8e67d7bb26faa5c41e6d628e8bbdad3ec351"dependencies = ["anyhow","heck 0.5.0",- "wit-parser 0.247.0",+ "wit-parser 0.251.0",][[package]]@@ -5651,18 +5617,18 @@ dependencies = [[[package]]name = "wit-bindgen-rust"-version = "0.57.0"+version = "0.58.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "7d627c556b10cb6d6575bfad59512eab613c5dd4ee387da055b3393fffe71c7a"+checksum = "1130ce1f531bc9f9a75922244aa773bf5e2117fda1ef4a86b9f98d6b8135eb46"dependencies = ["anyhow","heck 0.5.0","indexmap 2.14.0","prettyplease","syn 2.0.106",- "wasm-metadata 0.247.0",- "wit-bindgen-core 0.57.0",- "wit-component 0.247.0",+ "wasm-metadata 0.251.0",+ "wit-bindgen-core 0.58.0",+ "wit-component 0.251.0",][[package]]@@ -5682,9 +5648,9 @@ dependencies = [[[package]]name = "wit-bindgen-rust-macro"-version = "0.57.0"+version = "0.58.0"source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "dfe4b30298dcc5dbde153f1af8d0e45da7862b5f35c58da9cce65fbde5c6bffb"+checksum = "07296369e4d598e7e79b64eef66f724d83324ea671bcf677d78fc5cf92604ae5"dependencies = ["anyhow","macro-string",@@ -5692,8 +5658,8 @@ dependencies = ["proc-macro2","quote","syn 2.0.106",- "wit-bindgen-core 0.57.0",- "wit-bindgen-rust 0.57.0",+ "wit-bindgen-core 0.58.0",+ "wit-bindgen-rust 0.58.0",][[package]]@@ -5715,25 +5681,6 @@ dependencies = ["wit-parser 0.244.0",]-[[package]]-name = "wit-component"-version = "0.247.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "9d567162a6b9843080e5e0053f696623ff694bae8ae017c9ec536d1873bbe3d8"-dependencies = [- "anyhow",- "bitflags 2.11.1",- "indexmap 2.14.0",- "log",- "serde",- "serde_derive",- "serde_json",- "wasm-encoder 0.247.0",- "wasm-metadata 0.247.0",- "wasmparser 0.247.0",- "wit-parser 0.247.0",-]-[[package]]name = "wit-component"version = "0.251.0"@@ -5771,25 +5718,6 @@ dependencies = ["wasmparser 0.244.0",]-[[package]]-name = "wit-parser"-version = "0.247.0"-source = "registry+https://github.com/rust-lang/crates.io-index"-checksum = "8ffe4064318cdf3c08cb99343b44c039fcefe61ccdf58aa9975285f13d74d1fc"-dependencies = [- "anyhow",- "hashbrown 0.17.0",- "id-arena",- "indexmap 2.14.0",- "log",- "semver",- "serde",- "serde_derive",- "serde_json",- "unicode-xid",- "wasmparser 0.247.0",-]-[[package]]name = "wit-parser"version = "0.251.0"diff --git a/Cargo.toml b/Cargo.tomlindex 59387cf93f..aecd9a782e 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -351,8 +351,8 @@ cap-fs-ext = "4.0.2"io-lifetimes = { version = "3.0.1", default-features = false }rustix = "1.1.4"# wit-bindgen:-wit-bindgen = { version = "0.57.0", default-features = false }-wit-bindgen-rust-macro = { version = "0.57.0", default-features = false }+wit-bindgen = { version = "0.58.0", default-features = false }+wit-bindgen-rust-macro = { version = "0.58.0", default-features = false }# wasm-tools family:wasmparser = { version = "0.251.0", default-features = false, features = ['simd'] }diff --git a/crates/test-programs/src/bin/async_borrowing_callee.rs b/crates/test-programs/src/bin/async_borrowing_callee.rsindex d8c4bd0732..bd228338fd 100644--- a/crates/test-programs/src/bin/async_borrowing_callee.rs+++ b/crates/test-programs/src/bin/async_borrowing_callee.rs@@ -18,7 +18,7 @@ struct Component;impl Borrowing for Component {async fn foo(x: &X, misbehave: bool) {let handle = x.handle();- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {if misbehave {unsafe { X::from_handle(handle) }.foo();}diff --git a/crates/test-programs/src/bin/async_closed_streams.rs b/crates/test-programs/src/bin/async_closed_streams.rsindex 96cc77fbb2..05ff23b2b4 100644--- a/crates/test-programs/src/bin/async_closed_streams.rs+++ b/crates/test-programs/src/bin/async_closed_streams.rs@@ -39,7 +39,7 @@ impl Guest for Component {expected: u8,_rx_ignored: FutureReader<u8>,) {- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {assert_eq!(rx.await, expected);});}diff --git a/crates/test-programs/src/bin/async_cross_instance_source.rs b/crates/test-programs/src/bin/async_cross_instance_source.rsindex 0df26ef993..7d67ac1c30 100644--- a/crates/test-programs/src/bin/async_cross_instance_source.rs+++ b/crates/test-programs/src/bin/async_cross_instance_source.rs@@ -20,7 +20,7 @@ impl Guest for Component {let (mut stream_tx, stream_rx) = wit_stream::new();let (future_tx, future_rx) = wit_future::new(|| 0);- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {assert!(stream_tx.write_all(vec![2, 4, 6, 8, 9]).await.is_empty());future_tx.write(10).await.unwrap();});diff --git a/crates/test-programs/src/bin/async_short_reads.rs b/crates/test-programs/src/bin/async_short_reads.rsindex c647e01f8a..7723644140 100644--- a/crates/test-programs/src/bin/async_short_reads.rs+++ b/crates/test-programs/src/bin/async_short_reads.rs@@ -40,7 +40,7 @@ impl Guest for Component {) -> StreamReader<short_reads::Thing> {let (mut tx, rx) = wit_stream::new();- async_support::spawn(async move {+ async_support::spawn_local(async move {// Read the things one at a time, forcing the host to re-take// ownership of any unwritten items between writes.let mut things = Vec::new();diff --git a/crates/test-programs/src/bin/async_transmit_callee.rs b/crates/test-programs/src/bin/async_transmit_callee.rsindex f0b2070c3f..b33a300177 100644--- a/crates/test-programs/src/bin/async_transmit_callee.rs+++ b/crates/test-programs/src/bin/async_transmit_callee.rs@@ -34,7 +34,7 @@ impl Guest for Component {let (callee_future_tx1, callee_future_rx1) = wit_future::new(|| todo!());let (callee_future_tx2, callee_future_rx2) = wit_future::new(|| String::new());- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {let mut caller_future_rx1 = Some(caller_future_rx1);let mut callee_future_tx1 = Some(callee_future_tx1);diff --git a/crates/test-programs/src/bin/async_unit_stream_callee.rs b/crates/test-programs/src/bin/async_unit_stream_callee.rsindex 3c8d3d86cd..304f9c50c4 100644--- a/crates/test-programs/src/bin/async_unit_stream_callee.rs+++ b/crates/test-programs/src/bin/async_unit_stream_callee.rs@@ -19,7 +19,7 @@ impl Guest for Component {async fn run(count: u32) -> StreamReader<()> {let (mut tx, rx) = wit_stream::new();- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {let mut sent = 0;let mut chunk_size = 1;while sent < count {diff --git a/crates/test-programs/src/bin/async_yield_post_return_callee.rs b/crates/test-programs/src/bin/async_yield_post_return_callee.rsindex 12379c54f7..7a5e65350e 100644--- a/crates/test-programs/src/bin/async_yield_post_return_callee.rs+++ b/crates/test-programs/src/bin/async_yield_post_return_callee.rs@@ -18,7 +18,7 @@ struct Component;impl Guest for Component {async fn run(times: u64) {// Spawn a task to run post-return and otherwise return immediately.- async_support::spawn(async move {+ async_support::spawn_local(async move {// Yield for as long as requested:yield_::yield_times(times).await;});diff --git a/crates/test-programs/src/bin/async_yield_post_return_caller.rs b/crates/test-programs/src/bin/async_yield_post_return_caller.rsindex c21d5fd28e..fcd14a1de6 100644--- a/crates/test-programs/src/bin/async_yield_post_return_caller.rs+++ b/crates/test-programs/src/bin/async_yield_post_return_caller.rs@@ -21,7 +21,7 @@ struct Component;impl Guest for Component {async fn run(times: u64) {// Spawn a task to run post-return and otherwise return immediately.- async_support::spawn(async move {+ async_support::spawn_local(async move {// Create a couple of subtasks which will also return immediately// and yield post-return. These will not have completed once we// exit and thus will be reparented to the caller.diff --git a/crates/test-programs/src/bin/p3_api_proxy.rs b/crates/test-programs/src/bin/p3_api_proxy.rsindex 60a4fbb68c..8a2716a8c2 100644--- a/crates/test-programs/src/bin/p3_api_proxy.rs+++ b/crates/test-programs/src/bin/p3_api_proxy.rs@@ -1,7 +1,7 @@use futures::join;use test_programs::p3::wasi::http::types::{ErrorCode, Headers, Request, Response};use test_programs::p3::{wit_future, wit_stream};-use wit_bindgen::spawn;+use wit_bindgen::spawn_local;struct T;@@ -36,7 +36,7 @@ impl test_programs::p3::service::exports::wasi::http::handler::Guest for T {let (mut contents_tx, contents_rx) = wit_stream::new();let (trailers_tx, trailers_rx) = wit_future::new(|| todo!());let (resp, transmit) = Response::new(hdrs, Some(contents_rx), trailers_rx);- spawn(async {+ spawn_local(async {join!(async {let remaining = contents_tx.write_all(b"hello, world!".to_vec()).await;diff --git a/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rs b/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rsindex 1b0b5ab2f9..649a36305b 100644--- a/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rs+++ b/crates/test-programs/src/bin/p3_cli_hello_stdout_post_return.rs@@ -7,11 +7,11 @@ export!(Component);impl exports::wasi::cli::run::Guest for Component {async fn run() -> Result<(), ()> {let (mut tx, rx) = wit_stream::new();- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {wasi::cli::stdout::write_via_stream(rx).await.unwrap();});tx.write_all(b"hello, world\n".to_vec()).await;- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {// Yield a few times to allow the host to accept and process// the `run` result.for _ in 0..10 {diff --git a/crates/test-programs/src/bin/p3_cli_serve_hello_world.rs b/crates/test-programs/src/bin/p3_cli_serve_hello_world.rsindex 71bb9d719e..a7d9e7765d 100644--- a/crates/test-programs/src/bin/p3_cli_serve_hello_world.rs+++ b/crates/test-programs/src/bin/p3_cli_serve_hello_world.rs@@ -13,7 +13,7 @@ impl service::exports::wasi::http::handler::Guest for T {Response::new(Fields::new(), Some(body_rx), body_result_rx);drop(body_result_tx);- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {let remaining = body_tx.write_all(b"Hello, WASI!".to_vec()).await;assert!(remaining.is_empty());});diff --git a/crates/test-programs/src/bin/p3_cli_serve_post_return.rs b/crates/test-programs/src/bin/p3_cli_serve_post_return.rsindex e901feda9a..c900989363 100644--- a/crates/test-programs/src/bin/p3_cli_serve_post_return.rs+++ b/crates/test-programs/src/bin/p3_cli_serve_post_return.rs@@ -11,7 +11,7 @@ impl service::exports::wasi::http::handler::Guest for T {let (response, _future_result) = Response::new(Fields::new(), None, body_result_rx);drop(body_result_tx);- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {for _ in 0..10 {wit_bindgen::yield_async().await;}diff --git a/crates/test-programs/src/bin/p3_http_echo.rs b/crates/test-programs/src/bin/p3_http_echo.rsindex ba3f62bc2c..f6198a4e44 100644--- a/crates/test-programs/src/bin/p3_http_echo.rs+++ b/crates/test-programs/src/bin/p3_http_echo.rs@@ -31,7 +31,7 @@ impl Handler for Component {let (trailers_tx, trailers_rx) = wit_future::new(|| todo!());let (mut pipe_tx, pipe_rx) = wit_stream::new();- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {let mut body_rx = body;let mut chunk = Vec::with_capacity(1024);loop {diff --git a/crates/test-programs/src/bin/p3_http_middleware.rs b/crates/test-programs/src/bin/p3_http_middleware.rsindex 54fb11cb9b..400ba6bce3 100644--- a/crates/test-programs/src/bin/p3_http_middleware.rs+++ b/crates/test-programs/src/bin/p3_http_middleware.rs@@ -76,7 +76,7 @@ impl exports::wasi::http::handler::Guest for Component {let (trailers_tx, trailers_rx) = wit_future::new(|| todo!());let (mut pipe_tx, pipe_rx) = wit_stream::new();- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {{let mut decoder = DeflateDecoder::new(Vec::new());let mut status = StreamResult::Complete(0);@@ -140,7 +140,7 @@ impl exports::wasi::http::handler::Guest for Component {let (trailers_tx, trailers_rx) = wit_future::new(|| todo!());let (mut pipe_tx, pipe_rx) = wit_stream::new();- wit_bindgen::spawn(async move {+ wit_bindgen::spawn_local(async move {{let mut encoder = DeflateEncoder::new(Vec::new(), Compression::fast());let mut status = StreamResult::Complete(0);diff --git a/supply-chain/imports.lock b/supply-chain/imports.lockindex 7367007d0d..f4d7a48d9f 100644--- a/supply-chain/imports.lock+++ b/supply-chain/imports.lock@@ -811,13 +811,6 @@ user-id = 6825user-login = "sunfishcode"user-name = "Dan Gohman"-[[publisher.cap-net-ext]]-version = "4.0.2"-when = "2026-02-15"-user-id = 6825-user-login = "sunfishcode"-user-name = "Dan Gohman"-[[publisher.cap-primitives]]version = "4.0.2"when = "2026-02-15"@@ -2118,8 +2111,8 @@ when = "2026-01-12"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen]]-version = "0.57.0"-when = "2026-04-17"+version = "0.58.0"+when = "2026-06-08"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen-core]]@@ -2128,8 +2121,8 @@ when = "2026-01-12"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen-core]]-version = "0.57.0"-when = "2026-04-17"+version = "0.58.0"+when = "2026-06-08"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen-rt]]@@ -2144,8 +2137,8 @@ when = "2026-01-12"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen-rust]]-version = "0.57.0"-when = "2026-04-17"+version = "0.58.0"+when = "2026-06-08"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen-rust-macro]]@@ -2154,8 +2147,8 @@ when = "2026-01-12"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-bindgen-rust-macro]]-version = "0.57.0"-when = "2026-04-17"+version = "0.58.0"+when = "2026-06-08"trusted-publisher = "github:bytecodealliance/wit-bindgen"[[publisher.wit-component]]