From 643f6647dff20f6f53eab306d2c21322b0894548 Mon Sep 17 00:00:00 2001 From: Brian Hardock Date: Mon, 16 Mar 2026 12:17:46 -0600 Subject: [PATCH] Update to 0.3.0-rc-2026-03-15 Signed-off-by: Brian Hardock --- .github/workflows/main.yml | 2 +- Cargo.toml | 2 +- ci/regenerate.sh | 2 +- ci/vendor-wit.sh | 2 +- crates/wasip2/src/command.rs | 18 +- crates/wasip2/src/imports.rs | 12 +- crates/wasip2/src/proxy.rs | 16 +- crates/wasip3/Cargo.toml | 2 +- crates/wasip3/src/command.rs | 627 +-- crates/wasip3/src/imports.rs | 6698 +++++++++++++++++++++---- crates/wasip3/src/service.rs | 942 ++-- crates/wasip3/wit/deps/cli.wit | 154 +- crates/wasip3/wit/deps/clocks.wit | 34 +- crates/wasip3/wit/deps/filesystem.wit | 127 +- crates/wasip3/wit/deps/http.wit | 124 +- crates/wasip3/wit/deps/random.wit | 49 +- crates/wasip3/wit/deps/sockets.wit | 351 +- 17 files changed, 7067 insertions(+), 2095 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d67bdf2..f880c2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,7 @@ jobs: ./ci/vendor-wit.sh git diff --exit-code - run: | - version=0.53.0 + version=0.54.0 mkdir wit-bindgen cd wit-bindgen diff --git a/Cargo.toml b/Cargo.toml index 70d5863..f86dd77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ rust-version = "1.87.0" [workspace.dependencies] rand = { version = "0.8.5", default-features = false } wasi = { version = "0.14.6", path = ".", default-features = false } -wit-bindgen = { version = "0.51.0", default-features = false } +wit-bindgen = { version = "0.54.0", default-features = false } wasip1 = { version = "1.0.0", path = "crates/wasip1", default-features = false } wasip2 = { version = "1.0.1", path = "crates/wasip2", default-features = false } wasip3 = { version = "0.1.1", path = "crates/wasip3", default-features = false } diff --git a/ci/regenerate.sh b/ci/regenerate.sh index 5233b27..5508239 100755 --- a/ci/regenerate.sh +++ b/ci/regenerate.sh @@ -37,7 +37,7 @@ generate_p2 crates/wasip2/src/imports.rs \ --world wasi:cli/imports p2=0.2.9 -p3=0.3.0-rc-2026-02-09 +p3=0.3.0-rc-2026-03-15 # Generate bindings for the `wasi:cli/command` world specifically, namely the # macro `export_command`. diff --git a/ci/vendor-wit.sh b/ci/vendor-wit.sh index 8ffea79..c943bcb 100755 --- a/ci/vendor-wit.sh +++ b/ci/vendor-wit.sh @@ -22,7 +22,7 @@ wkg get --overwrite --format wit "wasi:sockets@${p2}" -o crates/wasip2/wit/deps/ rm -rf crates/wasip3/wit/deps mkdir -p crates/wasip3/wit/deps -p3=0.3.0-rc-2026-02-09 +p3=0.3.0-rc-2026-03-15 wkg get --overwrite --format wit "wasi:cli@${p3}" -o crates/wasip3/wit/deps/cli.wit wkg get --overwrite --format wit "wasi:clocks@${p3}" -o crates/wasip3/wit/deps/clocks.wit wkg get --overwrite --format wit "wasi:filesystem@${p3}" -o crates/wasip3/wit/deps/filesystem.wit diff --git a/crates/wasip2/src/command.rs b/crates/wasip2/src/command.rs index a7ce168..aeb39b8 100644 --- a/crates/wasip2/src/command.rs +++ b/crates/wasip2/src/command.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.53.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.54.0. DO NOT EDIT! // Options used: // * std_feature // * with "wasi:cli/environment@0.2.9" = "crate::cli::environment" @@ -99,10 +99,10 @@ pub mod exports { use super::super::super::super::_rt; #[doc(hidden)] #[allow(non_snake_case, unused_unsafe)] - pub unsafe fn _export_run_cabi() -> i32 { + pub unsafe fn _export_run_cabi() -> i32 { unsafe { #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); - let result0 = { T::run() }; + let result0 = { T_::run() }; let result1 = match result0 { Ok(_) => 0i32, Err(_) => 1i32, @@ -167,7 +167,7 @@ macro_rules! __export_command_impl { exports::wasi::cli::run::__export_wasi_cli_run_0_2_9_cabi!($ty with_types_in $($path_to_types_root)*:: exports::wasi::cli::run); const _ : () = { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe (link_section = - "component-type:wit-bindgen:0.53.0:wasi:cli@0.2.9:command:imports and exportsrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-command-world")] + "component-type:wit-bindgen:0.54.0:wasi:cli@0.2.9:command:imports and exportsrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-command-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE : [u8; 10773] = * b"\ @@ -387,8 +387,8 @@ nsecure-random-u64\x01\x02\x03\0\x1awasi:random/insecure@0.2.9\x05*\x01B\x03\x01 o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-\ seed@0.2.9\x05+\x01B\x03\x01j\0\0\x01@\0\0\0\x04\0\x03run\x01\x01\x04\0\x12wasi:\ cli/run@0.2.9\x05,\x04\0\x16wasi:cli/command@0.2.9\x04\0\x0b\x0d\x01\0\x07comman\ -d\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.245.0\x10\ -wit-bindgen-rust\x060.53.0"; +d\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.245.1\x10\ +wit-bindgen-rust\x060.54.0"; }; }; } @@ -397,8 +397,8 @@ pub use __export_command_impl as _export_command; #[rustfmt::skip] #[cfg(target_arch = "wasm32")] -#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.53.0:wasi:cli@0.2.9:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-command-world-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.53.0:wasi:cli@0.2.9:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-command-world"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.54.0:wasi:cli@0.2.9:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-command-world-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.54.0:wasi:cli@0.2.9:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-command-world"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -619,7 +619,7 @@ nsecure-random-u64\x01\x02\x03\0\x1awasi:random/insecure@0.2.9\x05*\x01B\x03\x01 o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-\ seed@0.2.9\x05+\x04\06wasi:cli/command-with-all-of-its-exports-removed@0.2.9\x04\ \0\x0b-\x01\0'command-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\x01\ -\x0cprocessed-by\x02\x0dwit-component\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +\x0cprocessed-by\x02\x0dwit-component\x070.245.1\x10wit-bindgen-rust\x060.54.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { diff --git a/crates/wasip2/src/imports.rs b/crates/wasip2/src/imports.rs index 617de47..9704cf2 100644 --- a/crates/wasip2/src/imports.rs +++ b/crates/wasip2/src/imports.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.53.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.54.0. DO NOT EDIT! // Options used: // * std_feature // * type_section_suffix: "rust-wasip2-1.0.2+wasi-0.2.9-from-crates-io" @@ -7460,6 +7460,7 @@ pub mod wasi { #[doc(hidden)] static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Network = super::super::super::wasi::sockets::network::Network; pub type ErrorCode = super::super::super::wasi::sockets::network::ErrorCode; pub type IpAddressFamily = super::super::super::wasi::sockets::network::IpAddressFamily; pub type UdpSocket = super::super::super::wasi::sockets::udp::UdpSocket; @@ -9465,6 +9466,7 @@ pub mod wasi { #[doc(hidden)] static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; + pub type Network = super::super::super::wasi::sockets::network::Network; pub type ErrorCode = super::super::super::wasi::sockets::network::ErrorCode; pub type IpAddressFamily = super::super::super::wasi::sockets::network::IpAddressFamily; pub type TcpSocket = super::super::super::wasi::sockets::tcp::TcpSocket; @@ -9995,8 +9997,8 @@ mod _rt { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] -#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.53.0:wasi:cli@0.2.9:imports:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.53.0:wasi:cli@0.2.9:imports:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.54.0:wasi:cli@0.2.9:imports:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.54.0:wasi:cli@0.2.9:imports:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -10216,8 +10218,8 @@ p}\x01@\x01\x03lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget nsecure-random-u64\x01\x02\x03\0\x1awasi:random/insecure@0.2.9\x05*\x01B\x03\x01\ o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-\ seed@0.2.9\x05+\x04\0\x16wasi:cli/imports@0.2.9\x04\0\x0b\x0d\x01\0\x07imports\x03\ -\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.245.0\x10wit-\ -bindgen-rust\x060.53.0"; +\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.245.1\x10wit-\ +bindgen-rust\x060.54.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { diff --git a/crates/wasip2/src/proxy.rs b/crates/wasip2/src/proxy.rs index c4041da..35c3068 100644 --- a/crates/wasip2/src/proxy.rs +++ b/crates/wasip2/src/proxy.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.53.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.54.0. DO NOT EDIT! // Options used: // * std_feature // * with "wasi:cli/stdin@0.2.9" = "crate::cli::stdin" @@ -6867,11 +6867,11 @@ pub mod exports { pub type ResponseOutparam = super::super::super::super::wasi::http::types::ResponseOutparam; #[doc(hidden)] #[allow(non_snake_case, unused_unsafe)] - pub unsafe fn _export_handle_cabi(arg0: i32, arg1: i32) { + pub unsafe fn _export_handle_cabi(arg0: i32, arg1: i32) { unsafe { #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); { - T::handle( + T_::handle( super::super::super::super::wasi::http::types::IncomingRequest::from_handle( arg0 as u32, ), @@ -7147,7 +7147,7 @@ macro_rules! __export_proxy_impl { with_types_in $($path_to_types_root)*:: exports::wasi::http::incoming_handler); const _ : () = { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe (link_section = - "component-type:wit-bindgen:0.53.0:wasi:http@0.2.9:proxy:imports and exportsrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-proxy-world")] + "component-type:wit-bindgen:0.54.0:wasi:http@0.2.9:proxy:imports and exportsrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-proxy-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE : [u8; 7040] = * b"\ @@ -7291,7 +7291,7 @@ incoming-request\x02\x03\0\x09\x11response-outparam\x01B\x08\x02\x03\x02\x01\x14 m\x03\0\x02\x01i\x01\x01i\x03\x01@\x02\x07request\x04\x0cresponse-out\x05\x01\0\x04\ \0\x06handle\x01\x06\x04\0\x20wasi:http/incoming-handler@0.2.9\x05\x16\x04\0\x15\ wasi:http/proxy@0.2.9\x04\0\x0b\x0b\x01\0\x05proxy\x03\0\0\0G\x09producers\x01\x0c\ -processed-by\x02\x0dwit-component\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +processed-by\x02\x0dwit-component\x070.245.1\x10wit-bindgen-rust\x060.54.0"; }; }; } @@ -7300,8 +7300,8 @@ pub use __export_proxy_impl as _export_proxy; #[rustfmt::skip] #[cfg(target_arch = "wasm32")] -#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.53.0:wasi:http@0.2.9:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-proxy-world-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.53.0:wasi:http@0.2.9:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-proxy-world"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.54.0:wasi:http@0.2.9:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-proxy-world-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.54.0:wasi:http@0.2.9:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.2+wasi-0.2.9-from-crates-io-proxy-world"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -7443,7 +7443,7 @@ i\x05\x01j\x01\x0b\x01\x07\x01@\x02\x07request\x08\x07options\x0a\0\x0c\x04\0\x0 handle\x01\x0d\x03\0\x20wasi:http/outgoing-handler@0.2.9\x05\x13\x04\05wasi:http\ /proxy-with-all-of-its-exports-removed@0.2.9\x04\0\x0b+\x01\0%proxy-with-all-of-\ its-exports-removed\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-compo\ -nent\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +nent\x070.245.1\x10wit-bindgen-rust\x060.54.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { diff --git a/crates/wasip3/Cargo.toml b/crates/wasip3/Cargo.toml index 44d798d..94027e3 100644 --- a/crates/wasip3/Cargo.toml +++ b/crates/wasip3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasip3" -version = "0.5.0+wasi-0.3.0-rc-2026-02-09" +version = "0.5.0+wasi-0.3.0-rc-2026-03-15" description = "WASIp3 API bindings for Rust" categories = ["no-std", "wasm"] keywords = ["webassembly", "wasm"] diff --git a/crates/wasip3/src/command.rs b/crates/wasip3/src/command.rs index aeb5c03..297721e 100644 --- a/crates/wasip3/src/command.rs +++ b/crates/wasip3/src/command.rs @@ -1,27 +1,27 @@ -// Generated by `wit-bindgen` 0.53.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.54.0. DO NOT EDIT! // Options used: -// * with "wasi:cli/environment@0.3.0-rc-2026-02-09" = "crate::cli::environment" -// * with "wasi:cli/exit@0.3.0-rc-2026-02-09" = "crate::cli::exit" -// * with "wasi:cli/stdin@0.3.0-rc-2026-02-09" = "crate::cli::stdin" -// * with "wasi:cli/stdout@0.3.0-rc-2026-02-09" = "crate::cli::stdout" -// * with "wasi:cli/stderr@0.3.0-rc-2026-02-09" = "crate::cli::stderr" -// * with "wasi:cli/types@0.3.0-rc-2026-02-09" = "crate::cli::types" -// * with "wasi:cli/terminal-input@0.3.0-rc-2026-02-09" = "crate::cli::terminal_input" -// * with "wasi:cli/terminal-output@0.3.0-rc-2026-02-09" = "crate::cli::terminal_output" -// * with "wasi:cli/terminal-stdin@0.3.0-rc-2026-02-09" = "crate::cli::terminal_stdin" -// * with "wasi:cli/terminal-stdout@0.3.0-rc-2026-02-09" = "crate::cli::terminal_stdout" -// * with "wasi:cli/terminal-stderr@0.3.0-rc-2026-02-09" = "crate::cli::terminal_stderr" -// * with "wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09" = "crate::clocks::monotonic_clock" -// * with "wasi:clocks/system-clock@0.3.0-rc-2026-02-09" = "crate::clocks::system_clock" -// * with "wasi:clocks/types@0.3.0-rc-2026-02-09" = "crate::clocks::types" -// * with "wasi:filesystem/types@0.3.0-rc-2026-02-09" = "crate::filesystem::types" -// * with "wasi:filesystem/preopens@0.3.0-rc-2026-02-09" = "crate::filesystem::preopens" -// * with "wasi:random/random@0.3.0-rc-2026-02-09" = "crate::random::random" -// * with "wasi:random/insecure@0.3.0-rc-2026-02-09" = "crate::random::insecure" -// * with "wasi:random/insecure-seed@0.3.0-rc-2026-02-09" = "crate::random::insecure_seed" -// * with "wasi:sockets/types@0.3.0-rc-2026-02-09" = "crate::sockets::types" -// * with "wasi:sockets/ip-name-lookup@0.3.0-rc-2026-02-09" = "crate::sockets::ip_name_lookup" -// * type_section_suffix: "rust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io-command-world" +// * with "wasi:cli/environment@0.3.0-rc-2026-03-15" = "crate::cli::environment" +// * with "wasi:cli/exit@0.3.0-rc-2026-03-15" = "crate::cli::exit" +// * with "wasi:cli/stdin@0.3.0-rc-2026-03-15" = "crate::cli::stdin" +// * with "wasi:cli/stdout@0.3.0-rc-2026-03-15" = "crate::cli::stdout" +// * with "wasi:cli/stderr@0.3.0-rc-2026-03-15" = "crate::cli::stderr" +// * with "wasi:cli/types@0.3.0-rc-2026-03-15" = "crate::cli::types" +// * with "wasi:cli/terminal-input@0.3.0-rc-2026-03-15" = "crate::cli::terminal_input" +// * with "wasi:cli/terminal-output@0.3.0-rc-2026-03-15" = "crate::cli::terminal_output" +// * with "wasi:cli/terminal-stdin@0.3.0-rc-2026-03-15" = "crate::cli::terminal_stdin" +// * with "wasi:cli/terminal-stdout@0.3.0-rc-2026-03-15" = "crate::cli::terminal_stdout" +// * with "wasi:cli/terminal-stderr@0.3.0-rc-2026-03-15" = "crate::cli::terminal_stderr" +// * with "wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15" = "crate::clocks::monotonic_clock" +// * with "wasi:clocks/system-clock@0.3.0-rc-2026-03-15" = "crate::clocks::system_clock" +// * with "wasi:clocks/types@0.3.0-rc-2026-03-15" = "crate::clocks::types" +// * with "wasi:filesystem/types@0.3.0-rc-2026-03-15" = "crate::filesystem::types" +// * with "wasi:filesystem/preopens@0.3.0-rc-2026-03-15" = "crate::filesystem::preopens" +// * with "wasi:random/random@0.3.0-rc-2026-03-15" = "crate::random::random" +// * with "wasi:random/insecure@0.3.0-rc-2026-03-15" = "crate::random::insecure" +// * with "wasi:random/insecure-seed@0.3.0-rc-2026-03-15" = "crate::random::insecure_seed" +// * with "wasi:sockets/types@0.3.0-rc-2026-03-15" = "crate::sockets::types" +// * with "wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15" = "crate::sockets::ip_name_lookup" +// * type_section_suffix: "rust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io-command-world" // * default-bindings-module: "$crate" // * export-macro-name: _export_command // * pub-export-macro @@ -80,19 +80,19 @@ pub mod exports { use super::super::super::super::_rt; #[doc(hidden)] #[allow(non_snake_case, unused_unsafe)] - pub unsafe fn _export_run_cabi() -> i32 { + pub unsafe fn _export_run_cabi() -> i32 { unsafe { #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); wit_bindgen::rt::async_support::start_task(async move { let _task_cancel = wit_bindgen::rt::async_support::TaskCancelOnDrop::new(); - let result0 = &{ T::run().await }; + let result0 = &{ T_::run().await }; let result1 = match result0 { Ok(_) => 0i32, Err(_) => 1i32, }; #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "[export]wasi:cli/run@0.3.0-rc-2026-02-09" + wasm_import_module = "[export]wasi:cli/run@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[task-return]run"] @@ -125,20 +125,20 @@ pub mod exports { } #[doc(hidden)] #[macro_export] - macro_rules! __export_wasi_cli_run_0_3_0_rc_2026_02_09_cabi { + macro_rules! __export_wasi_cli_run_0_3_0_rc_2026_03_15_cabi { ($ty:ident with_types_in $($path_to_types:tt)*) => { const _ : () = { #[unsafe (export_name = - "[async-lift]wasi:cli/run@0.3.0-rc-2026-02-09#run")] unsafe + "[async-lift]wasi:cli/run@0.3.0-rc-2026-03-15#run")] unsafe extern "C" fn export_run() -> i32 { unsafe { $($path_to_types)*:: _export_run_cabi::<$ty > () } } #[unsafe (export_name = - "[callback][async-lift]wasi:cli/run@0.3.0-rc-2026-02-09#run")] + "[callback][async-lift]wasi:cli/run@0.3.0-rc-2026-03-15#run")] unsafe extern "C" fn _callback_run(event0 : u32, event1 : u32, event2 : u32) -> u32 { unsafe { $($path_to_types)*:: __callback_run(event0, event1, event2) } } }; }; } #[doc(hidden)] - pub use __export_wasi_cli_run_0_3_0_rc_2026_02_09_cabi; + pub use __export_wasi_cli_run_0_3_0_rc_2026_03_15_cabi; } } } @@ -176,168 +176,173 @@ macro_rules! __export_command_impl { }; ($ty:ident with_types_in $($path_to_types_root:tt)*) => { $($path_to_types_root)*:: - exports::wasi::cli::run::__export_wasi_cli_run_0_3_0_rc_2026_02_09_cabi!($ty + exports::wasi::cli::run::__export_wasi_cli_run_0_3_0_rc_2026_03_15_cabi!($ty with_types_in $($path_to_types_root)*:: exports::wasi::cli::run); const _ : () = { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe (link_section = - "component-type:wit-bindgen:0.53.0:wasi:cli@0.3.0-rc-2026-02-09:command:imports and exportsrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io-command-world")] + "component-type:wit-bindgen:0.54.0:wasi:cli@0.3.0-rc-2026-03-15:command:imports and exportsrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io-command-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static - __WIT_BINDGEN_COMPONENT_TYPE : [u8; 8048] = * + __WIT_BINDGEN_COMPONENT_TYPE : [u8; 8219] = * b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xf2=\x01A\x02\x01A3\x01\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x9d?\x01A\x02\x01A3\x01\ B\x0a\x01o\x02ss\x01p\0\x01@\0\0\x01\x04\0\x0fget-environment\x01\x02\x01ps\x01@\ \0\0\x03\x04\0\x0dget-arguments\x01\x04\x01ks\x01@\0\0\x05\x04\0\x0fget-initial-\ -cwd\x01\x06\x03\0(wasi:cli/environment@0.3.0-rc-2026-02-09\x05\0\x01B\x03\x01j\0\ +cwd\x01\x06\x03\0(wasi:cli/environment@0.3.0-rc-2026-03-15\x05\0\x01B\x03\x01j\0\ \0\x01@\x01\x06status\0\x01\0\x04\0\x04exit\x01\x01\x03\0!wasi:cli/exit@0.3.0-rc\ --2026-02-09\x05\x01\x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\ -\0\x0aerror-code\x03\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-02-09\x05\x02\x02\x03\ +-2026-03-15\x05\x01\x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\ +\0\x0aerror-code\x03\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-03-15\x05\x02\x02\x03\ \0\x02\x0aerror-code\x01B\x08\x02\x03\x02\x01\x03\x04\0\x0aerror-code\x03\0\0\x01\ f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01o\x02\x02\x04\x01@\0\0\x05\x04\0\x0fread-v\ -ia-stream\x01\x06\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-02-09\x05\x04\x01B\x07\x02\ +ia-stream\x01\x06\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-03-15\x05\x04\x01B\x07\x02\ \x03\x02\x01\x03\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\ \x01@\x01\x04data\x02\0\x04\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/std\ -out@0.3.0-rc-2026-02-09\x05\x05\x01B\x07\x02\x03\x02\x01\x03\x04\0\x0aerror-code\ +out@0.3.0-rc-2026-03-15\x05\x05\x01B\x07\x02\x03\x02\x01\x03\x04\0\x0aerror-code\ \x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01@\x01\x04data\x02\0\x04\x04\0\x10\ -write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-02-09\x05\x06\x01B\x01\ -\x04\0\x0eterminal-input\x03\x01\x03\0+wasi:cli/terminal-input@0.3.0-rc-2026-02-\ -09\x05\x07\x01B\x01\x04\0\x0fterminal-output\x03\x01\x03\0,wasi:cli/terminal-out\ -put@0.3.0-rc-2026-02-09\x05\x08\x02\x03\0\x06\x0eterminal-input\x01B\x06\x02\x03\ +write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-03-15\x05\x06\x01B\x01\ +\x04\0\x0eterminal-input\x03\x01\x03\0+wasi:cli/terminal-input@0.3.0-rc-2026-03-\ +15\x05\x07\x01B\x01\x04\0\x0fterminal-output\x03\x01\x03\0,wasi:cli/terminal-out\ +put@0.3.0-rc-2026-03-15\x05\x08\x02\x03\0\x06\x0eterminal-input\x01B\x06\x02\x03\ \x02\x01\x09\x04\0\x0eterminal-input\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\x04\0\ -\x12get-terminal-stdin\x01\x04\x03\0+wasi:cli/terminal-stdin@0.3.0-rc-2026-02-09\ +\x12get-terminal-stdin\x01\x04\x03\0+wasi:cli/terminal-stdin@0.3.0-rc-2026-03-15\ \x05\x0a\x02\x03\0\x07\x0fterminal-output\x01B\x06\x02\x03\x02\x01\x0b\x04\0\x0f\ terminal-output\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\x04\0\x13get-terminal-std\ -out\x01\x04\x03\0,wasi:cli/terminal-stdout@0.3.0-rc-2026-02-09\x05\x0c\x01B\x06\x02\ +out\x01\x04\x03\0,wasi:cli/terminal-stdout@0.3.0-rc-2026-03-15\x05\x0c\x01B\x06\x02\ \x03\x02\x01\x0b\x04\0\x0fterminal-output\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\ \x04\0\x13get-terminal-stderr\x01\x04\x03\0,wasi:cli/terminal-stderr@0.3.0-rc-20\ -26-02-09\x05\x0d\x01B\x02\x01w\x04\0\x08duration\x03\0\0\x03\0%wasi:clocks/types\ -@0.3.0-rc-2026-02-09\x05\x0e\x02\x03\0\x0b\x08duration\x01B\x0c\x02\x03\x02\x01\x0f\ +26-03-15\x05\x0d\x01B\x02\x01w\x04\0\x08duration\x03\0\0\x03\0%wasi:clocks/types\ +@0.3.0-rc-2026-03-15\x05\x0e\x02\x03\0\x0b\x08duration\x01B\x0c\x02\x03\x02\x01\x0f\ \x04\0\x08duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\0\x03no\ w\x01\x04\x01@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\x01\0\ \x04\0\x0await-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-for\x01\ -\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09\x05\x10\x01B\x08\x02\x03\ +\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15\x05\x10\x01B\x08\x02\x03\ \x02\x01\x0f\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecondsy\x04\0\ \x07instant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0ege\ -t-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-02-09\x05\x11\x02\ -\x03\0\x0d\x07instant\x01BY\x02\x03\x02\x01\x12\x04\0\x07instant\x03\0\0\x01w\x04\ -\0\x08filesize\x03\0\x02\x01m\x08\x07unknown\x0cblock-device\x10character-device\ -\x09directory\x04fifo\x0dsymbolic-link\x0cregular-file\x06socket\x04\0\x0fdescri\ -ptor-type\x03\0\x04\x01n\x06\x04read\x05write\x13file-integrity-sync\x13data-int\ -egrity-sync\x14requested-write-sync\x10mutate-directory\x04\0\x10descriptor-flag\ -s\x03\0\x06\x01n\x01\x0esymlink-follow\x04\0\x0apath-flags\x03\0\x08\x01n\x04\x06\ -create\x09directory\x09exclusive\x08truncate\x04\0\x0aopen-flags\x03\0\x0a\x01w\x04\ -\0\x0alink-count\x03\0\x0c\x01k\x01\x01r\x06\x04type\x05\x0alink-count\x0d\x04si\ -ze\x03\x15data-access-timestamp\x0e\x1bdata-modification-timestamp\x0e\x17status\ --change-timestamp\x0e\x04\0\x0fdescriptor-stat\x03\0\x0f\x01q\x03\x09no-change\0\ -\0\x03now\0\0\x09timestamp\x01\x01\0\x04\0\x0dnew-timestamp\x03\0\x11\x01r\x02\x04\ -type\x05\x04names\x04\0\x0fdirectory-entry\x03\0\x13\x01m$\x06access\x07already\x0e\ -bad-descriptor\x04busy\x08deadlock\x05quota\x05exist\x0efile-too-large\x15illega\ -l-byte-sequence\x0bin-progress\x0binterrupted\x07invalid\x02io\x0cis-directory\x04\ -loop\x0etoo-many-links\x0cmessage-size\x0dname-too-long\x09no-device\x08no-entry\ -\x07no-lock\x13insufficient-memory\x12insufficient-space\x0dnot-directory\x09not\ --empty\x0fnot-recoverable\x0bunsupported\x06no-tty\x0eno-such-device\x08overflow\ -\x0dnot-permitted\x04pipe\x09read-only\x0cinvalid-seek\x0etext-file-busy\x0ccros\ -s-device\x04\0\x0aerror-code\x03\0\x15\x01m\x06\x06normal\x0asequential\x06rando\ -m\x09will-need\x09dont-need\x08no-reuse\x04\0\x06advice\x03\0\x17\x01r\x02\x05lo\ -werw\x05upperw\x04\0\x13metadata-hash-value\x03\0\x19\x04\0\x0adescriptor\x03\x01\ -\x01h\x1b\x01f\x01}\x01j\0\x01\x16\x01e\x01\x1e\x01o\x02\x1d\x1f\x01@\x02\x04sel\ -f\x1c\x06offset\x03\0\x20\x04\0\"[method]descriptor.read-via-stream\x01!\x01@\x03\ -\x04self\x1c\x04data\x1d\x06offset\x03\0\x1f\x04\0#[method]descriptor.write-via-\ -stream\x01\"\x01@\x02\x04self\x1c\x04data\x1d\0\x1f\x04\0$[method]descriptor.app\ -end-via-stream\x01#\x01C\x04\x04self\x1c\x06offset\x03\x06length\x03\x06advice\x18\ -\0\x1e\x04\0\x19[method]descriptor.advise\x01$\x01C\x01\x04self\x1c\0\x1e\x04\0\x1c\ -[method]descriptor.sync-data\x01%\x01j\x01\x07\x01\x16\x01C\x01\x04self\x1c\0&\x04\ -\0\x1c[method]descriptor.get-flags\x01'\x01j\x01\x05\x01\x16\x01C\x01\x04self\x1c\ -\0(\x04\0\x1b[method]descriptor.get-type\x01)\x01C\x02\x04self\x1c\x04size\x03\0\ -\x1e\x04\0\x1b[method]descriptor.set-size\x01*\x01C\x03\x04self\x1c\x15data-acce\ -ss-timestamp\x12\x1bdata-modification-timestamp\x12\0\x1e\x04\0\x1c[method]descr\ -iptor.set-times\x01+\x01f\x01\x14\x01o\x02,\x1f\x01@\x01\x04self\x1c\0-\x04\0![m\ -ethod]descriptor.read-directory\x01.\x04\0\x17[method]descriptor.sync\x01%\x01C\x02\ -\x04self\x1c\x04paths\0\x1e\x04\0&[method]descriptor.create-directory-at\x01/\x01\ -j\x01\x10\x01\x16\x01C\x01\x04self\x1c\00\x04\0\x17[method]descriptor.stat\x011\x01\ -C\x03\x04self\x1c\x0apath-flags\x09\x04paths\00\x04\0\x1a[method]descriptor.stat\ --at\x012\x01C\x05\x04self\x1c\x0apath-flags\x09\x04paths\x15data-access-timestam\ -p\x12\x1bdata-modification-timestamp\x12\0\x1e\x04\0\x1f[method]descriptor.set-t\ -imes-at\x013\x01C\x05\x04self\x1c\x0eold-path-flags\x09\x08old-paths\x0enew-desc\ -riptor\x1c\x08new-paths\0\x1e\x04\0\x1a[method]descriptor.link-at\x014\x01i\x1b\x01\ -j\x015\x01\x16\x01C\x05\x04self\x1c\x0apath-flags\x09\x04paths\x0aopen-flags\x0b\ -\x05flags\x07\06\x04\0\x1a[method]descriptor.open-at\x017\x01j\x01s\x01\x16\x01C\ -\x02\x04self\x1c\x04paths\08\x04\0\x1e[method]descriptor.readlink-at\x019\x04\0&\ -[method]descriptor.remove-directory-at\x01/\x01C\x04\x04self\x1c\x08old-paths\x0e\ -new-descriptor\x1c\x08new-paths\0\x1e\x04\0\x1c[method]descriptor.rename-at\x01:\ -\x01C\x03\x04self\x1c\x08old-paths\x08new-paths\0\x1e\x04\0\x1d[method]descripto\ -r.symlink-at\x01;\x04\0![method]descriptor.unlink-file-at\x01/\x01C\x02\x04self\x1c\ -\x05other\x1c\0\x7f\x04\0![method]descriptor.is-same-object\x01<\x01j\x01\x1a\x01\ -\x16\x01C\x01\x04self\x1c\0=\x04\0\x20[method]descriptor.metadata-hash\x01>\x01C\ -\x03\x04self\x1c\x0apath-flags\x09\x04paths\0=\x04\0#[method]descriptor.metadata\ --hash-at\x01?\x03\0)wasi:filesystem/types@0.3.0-rc-2026-02-09\x05\x13\x02\x03\0\x0e\ -\x0adescriptor\x01B\x07\x02\x03\x02\x01\x14\x04\0\x0adescriptor\x03\0\0\x01i\x01\ -\x01o\x02\x02s\x01p\x03\x01@\0\0\x04\x04\0\x0fget-directories\x01\x05\x03\0,wasi\ -:filesystem/preopens@0.3.0-rc-2026-02-09\x05\x15\x01Bq\x02\x03\x02\x01\x0f\x04\0\ -\x08duration\x03\0\0\x01m\x0e\x07unknown\x0daccess-denied\x0dnot-supported\x10in\ -valid-argument\x0dout-of-memory\x07timeout\x0dinvalid-state\x14address-not-binda\ -ble\x0eaddress-in-use\x12remote-unreachable\x12connection-refused\x10connection-\ -reset\x12connection-aborted\x12datagram-too-large\x04\0\x0aerror-code\x03\0\x02\x01\ -m\x02\x04ipv4\x04ipv6\x04\0\x11ip-address-family\x03\0\x04\x01o\x04}}}}\x04\0\x0c\ -ipv4-address\x03\0\x06\x01o\x08{{{{{{{{\x04\0\x0cipv6-address\x03\0\x08\x01q\x02\ -\x04ipv4\x01\x07\0\x04ipv6\x01\x09\0\x04\0\x0aip-address\x03\0\x0a\x01r\x02\x04p\ -ort{\x07address\x07\x04\0\x13ipv4-socket-address\x03\0\x0c\x01r\x04\x04port{\x09\ -flow-infoy\x07address\x09\x08scope-idy\x04\0\x13ipv6-socket-address\x03\0\x0e\x01\ -q\x02\x04ipv4\x01\x0d\0\x04ipv6\x01\x0f\0\x04\0\x11ip-socket-address\x03\0\x10\x04\ -\0\x0atcp-socket\x03\x01\x04\0\x0audp-socket\x03\x01\x01i\x12\x01j\x01\x14\x01\x03\ -\x01@\x01\x0eaddress-family\x05\0\x15\x04\0\x19[static]tcp-socket.create\x01\x16\ -\x01h\x12\x01j\0\x01\x03\x01@\x02\x04self\x17\x0dlocal-address\x11\0\x18\x04\0\x17\ -[method]tcp-socket.bind\x01\x19\x01C\x02\x04self\x17\x0eremote-address\x11\0\x18\ -\x04\0\x1a[method]tcp-socket.connect\x01\x1a\x01f\x01\x14\x01j\x01\x1b\x01\x03\x01\ -@\x01\x04self\x17\0\x1c\x04\0\x19[method]tcp-socket.listen\x01\x1d\x01f\x01}\x01\ -e\x01\x18\x01@\x02\x04self\x17\x04data\x1e\0\x1f\x04\0\x17[method]tcp-socket.sen\ -d\x01\x20\x01o\x02\x1e\x1f\x01@\x01\x04self\x17\0!\x04\0\x1a[method]tcp-socket.r\ -eceive\x01\"\x01j\x01\x11\x01\x03\x01@\x01\x04self\x17\0#\x04\0$[method]tcp-sock\ -et.get-local-address\x01$\x04\0%[method]tcp-socket.get-remote-address\x01$\x01@\x01\ -\x04self\x17\0\x7f\x04\0#[method]tcp-socket.get-is-listening\x01%\x01@\x01\x04se\ -lf\x17\0\x05\x04\0%[method]tcp-socket.get-address-family\x01&\x01@\x02\x04self\x17\ -\x05valuew\0\x18\x04\0*[method]tcp-socket.set-listen-backlog-size\x01'\x01j\x01\x7f\ -\x01\x03\x01@\x01\x04self\x17\0(\x04\0)[method]tcp-socket.get-keep-alive-enabled\ -\x01)\x01@\x02\x04self\x17\x05value\x7f\0\x18\x04\0)[method]tcp-socket.set-keep-\ -alive-enabled\x01*\x01j\x01\x01\x01\x03\x01@\x01\x04self\x17\0+\x04\0+[method]tc\ -p-socket.get-keep-alive-idle-time\x01,\x01@\x02\x04self\x17\x05value\x01\0\x18\x04\ -\0+[method]tcp-socket.set-keep-alive-idle-time\x01-\x04\0*[method]tcp-socket.get\ --keep-alive-interval\x01,\x04\0*[method]tcp-socket.set-keep-alive-interval\x01-\x01\ -j\x01y\x01\x03\x01@\x01\x04self\x17\0.\x04\0'[method]tcp-socket.get-keep-alive-c\ -ount\x01/\x01@\x02\x04self\x17\x05valuey\0\x18\x04\0'[method]tcp-socket.set-keep\ --alive-count\x010\x01j\x01}\x01\x03\x01@\x01\x04self\x17\01\x04\0\x20[method]tcp\ --socket.get-hop-limit\x012\x01@\x02\x04self\x17\x05value}\0\x18\x04\0\x20[method\ -]tcp-socket.set-hop-limit\x013\x01j\x01w\x01\x03\x01@\x01\x04self\x17\04\x04\0*[\ -method]tcp-socket.get-receive-buffer-size\x015\x04\0*[method]tcp-socket.set-rece\ -ive-buffer-size\x01'\x04\0'[method]tcp-socket.get-send-buffer-size\x015\x04\0'[m\ -ethod]tcp-socket.set-send-buffer-size\x01'\x01i\x13\x01j\x016\x01\x03\x01@\x01\x0e\ -address-family\x05\07\x04\0\x19[static]udp-socket.create\x018\x01h\x13\x01@\x02\x04\ -self9\x0dlocal-address\x11\0\x18\x04\0\x17[method]udp-socket.bind\x01:\x01@\x02\x04\ -self9\x0eremote-address\x11\0\x18\x04\0\x1a[method]udp-socket.connect\x01;\x01@\x01\ -\x04self9\0\x18\x04\0\x1d[method]udp-socket.disconnect\x01<\x01p}\x01k\x11\x01C\x03\ -\x04self9\x04data=\x0eremote-address>\0\x18\x04\0\x17[method]udp-socket.send\x01\ -?\x01o\x02=\x11\x01j\x01\xc0\0\x01\x03\x01C\x01\x04self9\0\xc1\0\x04\0\x1a[metho\ -d]udp-socket.receive\x01B\x01@\x01\x04self9\0#\x04\0$[method]udp-socket.get-loca\ -l-address\x01C\x04\0%[method]udp-socket.get-remote-address\x01C\x01@\x01\x04self\ -9\0\x05\x04\0%[method]udp-socket.get-address-family\x01D\x01@\x01\x04self9\01\x04\ -\0([method]udp-socket.get-unicast-hop-limit\x01E\x01@\x02\x04self9\x05value}\0\x18\ -\x04\0([method]udp-socket.set-unicast-hop-limit\x01F\x01@\x01\x04self9\04\x04\0*\ -[method]udp-socket.get-receive-buffer-size\x01G\x01@\x02\x04self9\x05valuew\0\x18\ -\x04\0*[method]udp-socket.set-receive-buffer-size\x01H\x04\0'[method]udp-socket.\ -get-send-buffer-size\x01G\x04\0'[method]udp-socket.set-send-buffer-size\x01H\x03\ -\0&wasi:sockets/types@0.3.0-rc-2026-02-09\x05\x16\x02\x03\0\x10\x0aip-address\x01\ -B\x08\x02\x03\x02\x01\x17\x04\0\x0aip-address\x03\0\0\x01m\x06\x07unknown\x0dacc\ -ess-denied\x10invalid-argument\x11name-unresolvable\x1atemporary-resolver-failur\ -e\x1apermanent-resolver-failure\x04\0\x0aerror-code\x03\0\x02\x01p\x01\x01j\x01\x04\ -\x01\x03\x01C\x01\x04names\0\x05\x04\0\x11resolve-addresses\x01\x06\x03\0/wasi:s\ -ockets/ip-name-lookup@0.3.0-rc-2026-02-09\x05\x18\x01B\x05\x01p}\x01@\x01\x03len\ -w\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget-random-u64\x01\x02\ -\x03\0&wasi:random/random@0.3.0-rc-2026-02-09\x05\x19\x01B\x05\x01p}\x01@\x01\x03\ -lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01@\0\0w\x04\0\x17get-insec\ -ure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0-rc-2026-02-09\x05\x1a\x01\ -B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\x03\0-wasi:random\ -/insecure-seed@0.3.0-rc-2026-02-09\x05\x1b\x01B\x03\x01j\0\0\x01C\0\0\0\x04\0\x03\ -run\x01\x01\x04\0\x20wasi:cli/run@0.3.0-rc-2026-02-09\x05\x1c\x04\0$wasi:cli/com\ -mand@0.3.0-rc-2026-02-09\x04\0\x0b\x0d\x01\0\x07command\x03\0\0\0G\x09producers\x01\ -\x0cprocessed-by\x02\x0dwit-component\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +t-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-03-15\x05\x11\x02\ +\x03\0\x0d\x07instant\x01BZ\x02\x03\x02\x01\x12\x04\0\x07instant\x03\0\0\x01w\x04\ +\0\x08filesize\x03\0\x02\x01ks\x01q\x08\x0cblock-device\0\0\x10character-device\0\ +\0\x09directory\0\0\x04fifo\0\0\x0dsymbolic-link\0\0\x0cregular-file\0\0\x06sock\ +et\0\0\x05other\x01\x04\0\x04\0\x0fdescriptor-type\x03\0\x05\x01n\x06\x04read\x05\ +write\x13file-integrity-sync\x13data-integrity-sync\x14requested-write-sync\x10m\ +utate-directory\x04\0\x10descriptor-flags\x03\0\x07\x01n\x01\x0esymlink-follow\x04\ +\0\x0apath-flags\x03\0\x09\x01n\x04\x06create\x09directory\x09exclusive\x08trunc\ +ate\x04\0\x0aopen-flags\x03\0\x0b\x01w\x04\0\x0alink-count\x03\0\x0d\x01k\x01\x01\ +r\x06\x04type\x06\x0alink-count\x0e\x04size\x03\x15data-access-timestamp\x0f\x1b\ +data-modification-timestamp\x0f\x17status-change-timestamp\x0f\x04\0\x0fdescript\ +or-stat\x03\0\x10\x01q\x03\x09no-change\0\0\x03now\0\0\x09timestamp\x01\x01\0\x04\ +\0\x0dnew-timestamp\x03\0\x12\x01r\x02\x04type\x06\x04names\x04\0\x0fdirectory-e\ +ntry\x03\0\x14\x01q%\x06access\0\0\x07already\0\0\x0ebad-descriptor\0\0\x04busy\0\ +\0\x08deadlock\0\0\x05quota\0\0\x05exist\0\0\x0efile-too-large\0\0\x15illegal-by\ +te-sequence\0\0\x0bin-progress\0\0\x0binterrupted\0\0\x07invalid\0\0\x02io\0\0\x0c\ +is-directory\0\0\x04loop\0\0\x0etoo-many-links\0\0\x0cmessage-size\0\0\x0dname-t\ +oo-long\0\0\x09no-device\0\0\x08no-entry\0\0\x07no-lock\0\0\x13insufficient-memo\ +ry\0\0\x12insufficient-space\0\0\x0dnot-directory\0\0\x09not-empty\0\0\x0fnot-re\ +coverable\0\0\x0bunsupported\0\0\x06no-tty\0\0\x0eno-such-device\0\0\x08overflow\ +\0\0\x0dnot-permitted\0\0\x04pipe\0\0\x09read-only\0\0\x0cinvalid-seek\0\0\x0ete\ +xt-file-busy\0\0\x0ccross-device\0\0\x05other\x01\x04\0\x04\0\x0aerror-code\x03\0\ +\x16\x01m\x06\x06normal\x0asequential\x06random\x09will-need\x09dont-need\x08no-\ +reuse\x04\0\x06advice\x03\0\x18\x01r\x02\x05lowerw\x05upperw\x04\0\x13metadata-h\ +ash-value\x03\0\x1a\x04\0\x0adescriptor\x03\x01\x01h\x1c\x01f\x01}\x01j\0\x01\x17\ +\x01e\x01\x1f\x01o\x02\x1e\x20\x01@\x02\x04self\x1d\x06offset\x03\0!\x04\0\"[met\ +hod]descriptor.read-via-stream\x01\"\x01@\x03\x04self\x1d\x04data\x1e\x06offset\x03\ +\0\x20\x04\0#[method]descriptor.write-via-stream\x01#\x01@\x02\x04self\x1d\x04da\ +ta\x1e\0\x20\x04\0$[method]descriptor.append-via-stream\x01$\x01C\x04\x04self\x1d\ +\x06offset\x03\x06length\x03\x06advice\x19\0\x1f\x04\0\x19[method]descriptor.adv\ +ise\x01%\x01C\x01\x04self\x1d\0\x1f\x04\0\x1c[method]descriptor.sync-data\x01&\x01\ +j\x01\x08\x01\x17\x01C\x01\x04self\x1d\0'\x04\0\x1c[method]descriptor.get-flags\x01\ +(\x01j\x01\x06\x01\x17\x01C\x01\x04self\x1d\0)\x04\0\x1b[method]descriptor.get-t\ +ype\x01*\x01C\x02\x04self\x1d\x04size\x03\0\x1f\x04\0\x1b[method]descriptor.set-\ +size\x01+\x01C\x03\x04self\x1d\x15data-access-timestamp\x13\x1bdata-modification\ +-timestamp\x13\0\x1f\x04\0\x1c[method]descriptor.set-times\x01,\x01f\x01\x15\x01\ +o\x02-\x20\x01@\x01\x04self\x1d\0.\x04\0![method]descriptor.read-directory\x01/\x04\ +\0\x17[method]descriptor.sync\x01&\x01C\x02\x04self\x1d\x04paths\0\x1f\x04\0&[me\ +thod]descriptor.create-directory-at\x010\x01j\x01\x11\x01\x17\x01C\x01\x04self\x1d\ +\01\x04\0\x17[method]descriptor.stat\x012\x01C\x03\x04self\x1d\x0apath-flags\x0a\ +\x04paths\01\x04\0\x1a[method]descriptor.stat-at\x013\x01C\x05\x04self\x1d\x0apa\ +th-flags\x0a\x04paths\x15data-access-timestamp\x13\x1bdata-modification-timestam\ +p\x13\0\x1f\x04\0\x1f[method]descriptor.set-times-at\x014\x01C\x05\x04self\x1d\x0e\ +old-path-flags\x0a\x08old-paths\x0enew-descriptor\x1d\x08new-paths\0\x1f\x04\0\x1a\ +[method]descriptor.link-at\x015\x01i\x1c\x01j\x016\x01\x17\x01C\x05\x04self\x1d\x0a\ +path-flags\x0a\x04paths\x0aopen-flags\x0c\x05flags\x08\07\x04\0\x1a[method]descr\ +iptor.open-at\x018\x01j\x01s\x01\x17\x01C\x02\x04self\x1d\x04paths\09\x04\0\x1e[\ +method]descriptor.readlink-at\x01:\x04\0&[method]descriptor.remove-directory-at\x01\ +0\x01C\x04\x04self\x1d\x08old-paths\x0enew-descriptor\x1d\x08new-paths\0\x1f\x04\ +\0\x1c[method]descriptor.rename-at\x01;\x01C\x03\x04self\x1d\x08old-paths\x08new\ +-paths\0\x1f\x04\0\x1d[method]descriptor.symlink-at\x01<\x04\0![method]descripto\ +r.unlink-file-at\x010\x01C\x02\x04self\x1d\x05other\x1d\0\x7f\x04\0![method]desc\ +riptor.is-same-object\x01=\x01j\x01\x1b\x01\x17\x01C\x01\x04self\x1d\0>\x04\0\x20\ +[method]descriptor.metadata-hash\x01?\x01C\x03\x04self\x1d\x0apath-flags\x0a\x04\ +paths\0>\x04\0#[method]descriptor.metadata-hash-at\x01@\x03\0)wasi:filesystem/ty\ +pes@0.3.0-rc-2026-03-15\x05\x13\x02\x03\0\x0e\x0adescriptor\x01B\x07\x02\x03\x02\ +\x01\x14\x04\0\x0adescriptor\x03\0\0\x01i\x01\x01o\x02\x02s\x01p\x03\x01@\0\0\x04\ +\x04\0\x0fget-directories\x01\x05\x03\0,wasi:filesystem/preopens@0.3.0-rc-2026-0\ +3-15\x05\x15\x01Br\x02\x03\x02\x01\x0f\x04\0\x08duration\x03\0\0\x01ks\x01q\x0f\x0d\ +access-denied\0\0\x0dnot-supported\0\0\x10invalid-argument\0\0\x0dout-of-memory\0\ +\0\x07timeout\0\0\x0dinvalid-state\0\0\x14address-not-bindable\0\0\x0eaddress-in\ +-use\0\0\x12remote-unreachable\0\0\x12connection-refused\0\0\x11connection-broke\ +n\0\0\x10connection-reset\0\0\x12connection-aborted\0\0\x12datagram-too-large\0\0\ +\x05other\x01\x02\0\x04\0\x0aerror-code\x03\0\x03\x01m\x02\x04ipv4\x04ipv6\x04\0\ +\x11ip-address-family\x03\0\x05\x01o\x04}}}}\x04\0\x0cipv4-address\x03\0\x07\x01\ +o\x08{{{{{{{{\x04\0\x0cipv6-address\x03\0\x09\x01q\x02\x04ipv4\x01\x08\0\x04ipv6\ +\x01\x0a\0\x04\0\x0aip-address\x03\0\x0b\x01r\x02\x04port{\x07address\x08\x04\0\x13\ +ipv4-socket-address\x03\0\x0d\x01r\x04\x04port{\x09flow-infoy\x07address\x0a\x08\ +scope-idy\x04\0\x13ipv6-socket-address\x03\0\x0f\x01q\x02\x04ipv4\x01\x0e\0\x04i\ +pv6\x01\x10\0\x04\0\x11ip-socket-address\x03\0\x11\x04\0\x0atcp-socket\x03\x01\x04\ +\0\x0audp-socket\x03\x01\x01i\x13\x01j\x01\x15\x01\x04\x01@\x01\x0eaddress-famil\ +y\x06\0\x16\x04\0\x19[static]tcp-socket.create\x01\x17\x01h\x13\x01j\0\x01\x04\x01\ +@\x02\x04self\x18\x0dlocal-address\x12\0\x19\x04\0\x17[method]tcp-socket.bind\x01\ +\x1a\x01C\x02\x04self\x18\x0eremote-address\x12\0\x19\x04\0\x1a[method]tcp-socke\ +t.connect\x01\x1b\x01f\x01\x15\x01j\x01\x1c\x01\x04\x01@\x01\x04self\x18\0\x1d\x04\ +\0\x19[method]tcp-socket.listen\x01\x1e\x01f\x01}\x01e\x01\x19\x01@\x02\x04self\x18\ +\x04data\x1f\0\x20\x04\0\x17[method]tcp-socket.send\x01!\x01o\x02\x1f\x20\x01@\x01\ +\x04self\x18\0\"\x04\0\x1a[method]tcp-socket.receive\x01#\x01j\x01\x12\x01\x04\x01\ +@\x01\x04self\x18\0$\x04\0$[method]tcp-socket.get-local-address\x01%\x04\0%[meth\ +od]tcp-socket.get-remote-address\x01%\x01@\x01\x04self\x18\0\x7f\x04\0#[method]t\ +cp-socket.get-is-listening\x01&\x01@\x01\x04self\x18\0\x06\x04\0%[method]tcp-soc\ +ket.get-address-family\x01'\x01@\x02\x04self\x18\x05valuew\0\x19\x04\0*[method]t\ +cp-socket.set-listen-backlog-size\x01(\x01j\x01\x7f\x01\x04\x01@\x01\x04self\x18\ +\0)\x04\0)[method]tcp-socket.get-keep-alive-enabled\x01*\x01@\x02\x04self\x18\x05\ +value\x7f\0\x19\x04\0)[method]tcp-socket.set-keep-alive-enabled\x01+\x01j\x01\x01\ +\x01\x04\x01@\x01\x04self\x18\0,\x04\0+[method]tcp-socket.get-keep-alive-idle-ti\ +me\x01-\x01@\x02\x04self\x18\x05value\x01\0\x19\x04\0+[method]tcp-socket.set-kee\ +p-alive-idle-time\x01.\x04\0*[method]tcp-socket.get-keep-alive-interval\x01-\x04\ +\0*[method]tcp-socket.set-keep-alive-interval\x01.\x01j\x01y\x01\x04\x01@\x01\x04\ +self\x18\0/\x04\0'[method]tcp-socket.get-keep-alive-count\x010\x01@\x02\x04self\x18\ +\x05valuey\0\x19\x04\0'[method]tcp-socket.set-keep-alive-count\x011\x01j\x01}\x01\ +\x04\x01@\x01\x04self\x18\02\x04\0\x20[method]tcp-socket.get-hop-limit\x013\x01@\ +\x02\x04self\x18\x05value}\0\x19\x04\0\x20[method]tcp-socket.set-hop-limit\x014\x01\ +j\x01w\x01\x04\x01@\x01\x04self\x18\05\x04\0*[method]tcp-socket.get-receive-buff\ +er-size\x016\x04\0*[method]tcp-socket.set-receive-buffer-size\x01(\x04\0'[method\ +]tcp-socket.get-send-buffer-size\x016\x04\0'[method]tcp-socket.set-send-buffer-s\ +ize\x01(\x01i\x14\x01j\x017\x01\x04\x01@\x01\x0eaddress-family\x06\08\x04\0\x19[\ +static]udp-socket.create\x019\x01h\x14\x01@\x02\x04self:\x0dlocal-address\x12\0\x19\ +\x04\0\x17[method]udp-socket.bind\x01;\x01@\x02\x04self:\x0eremote-address\x12\0\ +\x19\x04\0\x1a[method]udp-socket.connect\x01<\x01@\x01\x04self:\0\x19\x04\0\x1d[\ +method]udp-socket.disconnect\x01=\x01p}\x01k\x12\x01C\x03\x04self:\x04data>\x0er\ +emote-address?\0\x19\x04\0\x17[method]udp-socket.send\x01@\x01o\x02>\x12\x01j\x01\ +\xc1\0\x01\x04\x01C\x01\x04self:\0\xc2\0\x04\0\x1a[method]udp-socket.receive\x01\ +C\x01@\x01\x04self:\0$\x04\0$[method]udp-socket.get-local-address\x01D\x04\0%[me\ +thod]udp-socket.get-remote-address\x01D\x01@\x01\x04self:\0\x06\x04\0%[method]ud\ +p-socket.get-address-family\x01E\x01@\x01\x04self:\02\x04\0([method]udp-socket.g\ +et-unicast-hop-limit\x01F\x01@\x02\x04self:\x05value}\0\x19\x04\0([method]udp-so\ +cket.set-unicast-hop-limit\x01G\x01@\x01\x04self:\05\x04\0*[method]udp-socket.ge\ +t-receive-buffer-size\x01H\x01@\x02\x04self:\x05valuew\0\x19\x04\0*[method]udp-s\ +ocket.set-receive-buffer-size\x01I\x04\0'[method]udp-socket.get-send-buffer-size\ +\x01H\x04\0'[method]udp-socket.set-send-buffer-size\x01I\x03\0&wasi:sockets/type\ +s@0.3.0-rc-2026-03-15\x05\x16\x02\x03\0\x10\x0aip-address\x01B\x09\x02\x03\x02\x01\ +\x17\x04\0\x0aip-address\x03\0\0\x01ks\x01q\x06\x0daccess-denied\0\0\x10invalid-\ +argument\0\0\x11name-unresolvable\0\0\x1atemporary-resolver-failure\0\0\x1aperma\ +nent-resolver-failure\0\0\x05other\x01\x02\0\x04\0\x0aerror-code\x03\0\x03\x01p\x01\ +\x01j\x01\x05\x01\x04\x01C\x01\x04names\0\x06\x04\0\x11resolve-addresses\x01\x07\ +\x03\0/wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15\x05\x18\x01B\x05\x01p}\x01\ +@\x01\x07max-lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget-r\ +andom-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-03-15\x05\x19\x01B\x05\x01\ +p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01@\0\0w\ +\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0-rc-20\ +26-03-15\x05\x1a\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\ +\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-03-15\x05\x1b\x01B\x03\x01j\0\0\x01\ +C\0\0\0\x04\0\x03run\x01\x01\x04\0\x20wasi:cli/run@0.3.0-rc-2026-03-15\x05\x1c\x04\ +\0$wasi:cli/command@0.3.0-rc-2026-03-15\x04\0\x0b\x0d\x01\0\x07command\x03\0\0\0\ +G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.245.1\x10wit-bindge\ +n-rust\x060.54.0"; }; }; } @@ -346,166 +351,170 @@ pub use __export_command_impl as _export_command; #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe( - link_section = "component-type:wit-bindgen:0.53.0:wasi:cli@0.3.0-rc-2026-02-09:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io-command-world" + link_section = "component-type:wit-bindgen:0.54.0:wasi:cli@0.3.0-rc-2026-03-15:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io-command-world" )] #[doc(hidden)] #[allow(clippy::octal_escapes)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 8055] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xd9=\x01A\x02\x01A1\x01\ +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 8226] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x84?\x01A\x02\x01A1\x01\ B\x0a\x01o\x02ss\x01p\0\x01@\0\0\x01\x04\0\x0fget-environment\x01\x02\x01ps\x01@\ \0\0\x03\x04\0\x0dget-arguments\x01\x04\x01ks\x01@\0\0\x05\x04\0\x0fget-initial-\ -cwd\x01\x06\x03\0(wasi:cli/environment@0.3.0-rc-2026-02-09\x05\0\x01B\x03\x01j\0\ +cwd\x01\x06\x03\0(wasi:cli/environment@0.3.0-rc-2026-03-15\x05\0\x01B\x03\x01j\0\ \0\x01@\x01\x06status\0\x01\0\x04\0\x04exit\x01\x01\x03\0!wasi:cli/exit@0.3.0-rc\ --2026-02-09\x05\x01\x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\ -\0\x0aerror-code\x03\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-02-09\x05\x02\x02\x03\ +-2026-03-15\x05\x01\x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\ +\0\x0aerror-code\x03\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-03-15\x05\x02\x02\x03\ \0\x02\x0aerror-code\x01B\x08\x02\x03\x02\x01\x03\x04\0\x0aerror-code\x03\0\0\x01\ f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01o\x02\x02\x04\x01@\0\0\x05\x04\0\x0fread-v\ -ia-stream\x01\x06\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-02-09\x05\x04\x01B\x07\x02\ +ia-stream\x01\x06\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-03-15\x05\x04\x01B\x07\x02\ \x03\x02\x01\x03\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\ \x01@\x01\x04data\x02\0\x04\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/std\ -out@0.3.0-rc-2026-02-09\x05\x05\x01B\x07\x02\x03\x02\x01\x03\x04\0\x0aerror-code\ +out@0.3.0-rc-2026-03-15\x05\x05\x01B\x07\x02\x03\x02\x01\x03\x04\0\x0aerror-code\ \x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01@\x01\x04data\x02\0\x04\x04\0\x10\ -write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-02-09\x05\x06\x01B\x01\ -\x04\0\x0eterminal-input\x03\x01\x03\0+wasi:cli/terminal-input@0.3.0-rc-2026-02-\ -09\x05\x07\x01B\x01\x04\0\x0fterminal-output\x03\x01\x03\0,wasi:cli/terminal-out\ -put@0.3.0-rc-2026-02-09\x05\x08\x02\x03\0\x06\x0eterminal-input\x01B\x06\x02\x03\ +write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-03-15\x05\x06\x01B\x01\ +\x04\0\x0eterminal-input\x03\x01\x03\0+wasi:cli/terminal-input@0.3.0-rc-2026-03-\ +15\x05\x07\x01B\x01\x04\0\x0fterminal-output\x03\x01\x03\0,wasi:cli/terminal-out\ +put@0.3.0-rc-2026-03-15\x05\x08\x02\x03\0\x06\x0eterminal-input\x01B\x06\x02\x03\ \x02\x01\x09\x04\0\x0eterminal-input\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\x04\0\ -\x12get-terminal-stdin\x01\x04\x03\0+wasi:cli/terminal-stdin@0.3.0-rc-2026-02-09\ +\x12get-terminal-stdin\x01\x04\x03\0+wasi:cli/terminal-stdin@0.3.0-rc-2026-03-15\ \x05\x0a\x02\x03\0\x07\x0fterminal-output\x01B\x06\x02\x03\x02\x01\x0b\x04\0\x0f\ terminal-output\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\x04\0\x13get-terminal-std\ -out\x01\x04\x03\0,wasi:cli/terminal-stdout@0.3.0-rc-2026-02-09\x05\x0c\x01B\x06\x02\ +out\x01\x04\x03\0,wasi:cli/terminal-stdout@0.3.0-rc-2026-03-15\x05\x0c\x01B\x06\x02\ \x03\x02\x01\x0b\x04\0\x0fterminal-output\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\ \x04\0\x13get-terminal-stderr\x01\x04\x03\0,wasi:cli/terminal-stderr@0.3.0-rc-20\ -26-02-09\x05\x0d\x01B\x02\x01w\x04\0\x08duration\x03\0\0\x03\0%wasi:clocks/types\ -@0.3.0-rc-2026-02-09\x05\x0e\x02\x03\0\x0b\x08duration\x01B\x0c\x02\x03\x02\x01\x0f\ +26-03-15\x05\x0d\x01B\x02\x01w\x04\0\x08duration\x03\0\0\x03\0%wasi:clocks/types\ +@0.3.0-rc-2026-03-15\x05\x0e\x02\x03\0\x0b\x08duration\x01B\x0c\x02\x03\x02\x01\x0f\ \x04\0\x08duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\0\x03no\ w\x01\x04\x01@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\x01\0\ \x04\0\x0await-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-for\x01\ -\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09\x05\x10\x01B\x08\x02\x03\ +\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15\x05\x10\x01B\x08\x02\x03\ \x02\x01\x0f\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecondsy\x04\0\ \x07instant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0ege\ -t-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-02-09\x05\x11\x02\ -\x03\0\x0d\x07instant\x01BY\x02\x03\x02\x01\x12\x04\0\x07instant\x03\0\0\x01w\x04\ -\0\x08filesize\x03\0\x02\x01m\x08\x07unknown\x0cblock-device\x10character-device\ -\x09directory\x04fifo\x0dsymbolic-link\x0cregular-file\x06socket\x04\0\x0fdescri\ -ptor-type\x03\0\x04\x01n\x06\x04read\x05write\x13file-integrity-sync\x13data-int\ -egrity-sync\x14requested-write-sync\x10mutate-directory\x04\0\x10descriptor-flag\ -s\x03\0\x06\x01n\x01\x0esymlink-follow\x04\0\x0apath-flags\x03\0\x08\x01n\x04\x06\ -create\x09directory\x09exclusive\x08truncate\x04\0\x0aopen-flags\x03\0\x0a\x01w\x04\ -\0\x0alink-count\x03\0\x0c\x01k\x01\x01r\x06\x04type\x05\x0alink-count\x0d\x04si\ -ze\x03\x15data-access-timestamp\x0e\x1bdata-modification-timestamp\x0e\x17status\ --change-timestamp\x0e\x04\0\x0fdescriptor-stat\x03\0\x0f\x01q\x03\x09no-change\0\ -\0\x03now\0\0\x09timestamp\x01\x01\0\x04\0\x0dnew-timestamp\x03\0\x11\x01r\x02\x04\ -type\x05\x04names\x04\0\x0fdirectory-entry\x03\0\x13\x01m$\x06access\x07already\x0e\ -bad-descriptor\x04busy\x08deadlock\x05quota\x05exist\x0efile-too-large\x15illega\ -l-byte-sequence\x0bin-progress\x0binterrupted\x07invalid\x02io\x0cis-directory\x04\ -loop\x0etoo-many-links\x0cmessage-size\x0dname-too-long\x09no-device\x08no-entry\ -\x07no-lock\x13insufficient-memory\x12insufficient-space\x0dnot-directory\x09not\ --empty\x0fnot-recoverable\x0bunsupported\x06no-tty\x0eno-such-device\x08overflow\ -\x0dnot-permitted\x04pipe\x09read-only\x0cinvalid-seek\x0etext-file-busy\x0ccros\ -s-device\x04\0\x0aerror-code\x03\0\x15\x01m\x06\x06normal\x0asequential\x06rando\ -m\x09will-need\x09dont-need\x08no-reuse\x04\0\x06advice\x03\0\x17\x01r\x02\x05lo\ -werw\x05upperw\x04\0\x13metadata-hash-value\x03\0\x19\x04\0\x0adescriptor\x03\x01\ -\x01h\x1b\x01f\x01}\x01j\0\x01\x16\x01e\x01\x1e\x01o\x02\x1d\x1f\x01@\x02\x04sel\ -f\x1c\x06offset\x03\0\x20\x04\0\"[method]descriptor.read-via-stream\x01!\x01@\x03\ -\x04self\x1c\x04data\x1d\x06offset\x03\0\x1f\x04\0#[method]descriptor.write-via-\ -stream\x01\"\x01@\x02\x04self\x1c\x04data\x1d\0\x1f\x04\0$[method]descriptor.app\ -end-via-stream\x01#\x01C\x04\x04self\x1c\x06offset\x03\x06length\x03\x06advice\x18\ -\0\x1e\x04\0\x19[method]descriptor.advise\x01$\x01C\x01\x04self\x1c\0\x1e\x04\0\x1c\ -[method]descriptor.sync-data\x01%\x01j\x01\x07\x01\x16\x01C\x01\x04self\x1c\0&\x04\ -\0\x1c[method]descriptor.get-flags\x01'\x01j\x01\x05\x01\x16\x01C\x01\x04self\x1c\ -\0(\x04\0\x1b[method]descriptor.get-type\x01)\x01C\x02\x04self\x1c\x04size\x03\0\ -\x1e\x04\0\x1b[method]descriptor.set-size\x01*\x01C\x03\x04self\x1c\x15data-acce\ -ss-timestamp\x12\x1bdata-modification-timestamp\x12\0\x1e\x04\0\x1c[method]descr\ -iptor.set-times\x01+\x01f\x01\x14\x01o\x02,\x1f\x01@\x01\x04self\x1c\0-\x04\0![m\ -ethod]descriptor.read-directory\x01.\x04\0\x17[method]descriptor.sync\x01%\x01C\x02\ -\x04self\x1c\x04paths\0\x1e\x04\0&[method]descriptor.create-directory-at\x01/\x01\ -j\x01\x10\x01\x16\x01C\x01\x04self\x1c\00\x04\0\x17[method]descriptor.stat\x011\x01\ -C\x03\x04self\x1c\x0apath-flags\x09\x04paths\00\x04\0\x1a[method]descriptor.stat\ --at\x012\x01C\x05\x04self\x1c\x0apath-flags\x09\x04paths\x15data-access-timestam\ -p\x12\x1bdata-modification-timestamp\x12\0\x1e\x04\0\x1f[method]descriptor.set-t\ -imes-at\x013\x01C\x05\x04self\x1c\x0eold-path-flags\x09\x08old-paths\x0enew-desc\ -riptor\x1c\x08new-paths\0\x1e\x04\0\x1a[method]descriptor.link-at\x014\x01i\x1b\x01\ -j\x015\x01\x16\x01C\x05\x04self\x1c\x0apath-flags\x09\x04paths\x0aopen-flags\x0b\ -\x05flags\x07\06\x04\0\x1a[method]descriptor.open-at\x017\x01j\x01s\x01\x16\x01C\ -\x02\x04self\x1c\x04paths\08\x04\0\x1e[method]descriptor.readlink-at\x019\x04\0&\ -[method]descriptor.remove-directory-at\x01/\x01C\x04\x04self\x1c\x08old-paths\x0e\ -new-descriptor\x1c\x08new-paths\0\x1e\x04\0\x1c[method]descriptor.rename-at\x01:\ -\x01C\x03\x04self\x1c\x08old-paths\x08new-paths\0\x1e\x04\0\x1d[method]descripto\ -r.symlink-at\x01;\x04\0![method]descriptor.unlink-file-at\x01/\x01C\x02\x04self\x1c\ -\x05other\x1c\0\x7f\x04\0![method]descriptor.is-same-object\x01<\x01j\x01\x1a\x01\ -\x16\x01C\x01\x04self\x1c\0=\x04\0\x20[method]descriptor.metadata-hash\x01>\x01C\ -\x03\x04self\x1c\x0apath-flags\x09\x04paths\0=\x04\0#[method]descriptor.metadata\ --hash-at\x01?\x03\0)wasi:filesystem/types@0.3.0-rc-2026-02-09\x05\x13\x02\x03\0\x0e\ -\x0adescriptor\x01B\x07\x02\x03\x02\x01\x14\x04\0\x0adescriptor\x03\0\0\x01i\x01\ -\x01o\x02\x02s\x01p\x03\x01@\0\0\x04\x04\0\x0fget-directories\x01\x05\x03\0,wasi\ -:filesystem/preopens@0.3.0-rc-2026-02-09\x05\x15\x01Bq\x02\x03\x02\x01\x0f\x04\0\ -\x08duration\x03\0\0\x01m\x0e\x07unknown\x0daccess-denied\x0dnot-supported\x10in\ -valid-argument\x0dout-of-memory\x07timeout\x0dinvalid-state\x14address-not-binda\ -ble\x0eaddress-in-use\x12remote-unreachable\x12connection-refused\x10connection-\ -reset\x12connection-aborted\x12datagram-too-large\x04\0\x0aerror-code\x03\0\x02\x01\ -m\x02\x04ipv4\x04ipv6\x04\0\x11ip-address-family\x03\0\x04\x01o\x04}}}}\x04\0\x0c\ -ipv4-address\x03\0\x06\x01o\x08{{{{{{{{\x04\0\x0cipv6-address\x03\0\x08\x01q\x02\ -\x04ipv4\x01\x07\0\x04ipv6\x01\x09\0\x04\0\x0aip-address\x03\0\x0a\x01r\x02\x04p\ -ort{\x07address\x07\x04\0\x13ipv4-socket-address\x03\0\x0c\x01r\x04\x04port{\x09\ -flow-infoy\x07address\x09\x08scope-idy\x04\0\x13ipv6-socket-address\x03\0\x0e\x01\ -q\x02\x04ipv4\x01\x0d\0\x04ipv6\x01\x0f\0\x04\0\x11ip-socket-address\x03\0\x10\x04\ -\0\x0atcp-socket\x03\x01\x04\0\x0audp-socket\x03\x01\x01i\x12\x01j\x01\x14\x01\x03\ -\x01@\x01\x0eaddress-family\x05\0\x15\x04\0\x19[static]tcp-socket.create\x01\x16\ -\x01h\x12\x01j\0\x01\x03\x01@\x02\x04self\x17\x0dlocal-address\x11\0\x18\x04\0\x17\ -[method]tcp-socket.bind\x01\x19\x01C\x02\x04self\x17\x0eremote-address\x11\0\x18\ -\x04\0\x1a[method]tcp-socket.connect\x01\x1a\x01f\x01\x14\x01j\x01\x1b\x01\x03\x01\ -@\x01\x04self\x17\0\x1c\x04\0\x19[method]tcp-socket.listen\x01\x1d\x01f\x01}\x01\ -e\x01\x18\x01@\x02\x04self\x17\x04data\x1e\0\x1f\x04\0\x17[method]tcp-socket.sen\ -d\x01\x20\x01o\x02\x1e\x1f\x01@\x01\x04self\x17\0!\x04\0\x1a[method]tcp-socket.r\ -eceive\x01\"\x01j\x01\x11\x01\x03\x01@\x01\x04self\x17\0#\x04\0$[method]tcp-sock\ -et.get-local-address\x01$\x04\0%[method]tcp-socket.get-remote-address\x01$\x01@\x01\ -\x04self\x17\0\x7f\x04\0#[method]tcp-socket.get-is-listening\x01%\x01@\x01\x04se\ -lf\x17\0\x05\x04\0%[method]tcp-socket.get-address-family\x01&\x01@\x02\x04self\x17\ -\x05valuew\0\x18\x04\0*[method]tcp-socket.set-listen-backlog-size\x01'\x01j\x01\x7f\ -\x01\x03\x01@\x01\x04self\x17\0(\x04\0)[method]tcp-socket.get-keep-alive-enabled\ -\x01)\x01@\x02\x04self\x17\x05value\x7f\0\x18\x04\0)[method]tcp-socket.set-keep-\ -alive-enabled\x01*\x01j\x01\x01\x01\x03\x01@\x01\x04self\x17\0+\x04\0+[method]tc\ -p-socket.get-keep-alive-idle-time\x01,\x01@\x02\x04self\x17\x05value\x01\0\x18\x04\ -\0+[method]tcp-socket.set-keep-alive-idle-time\x01-\x04\0*[method]tcp-socket.get\ --keep-alive-interval\x01,\x04\0*[method]tcp-socket.set-keep-alive-interval\x01-\x01\ -j\x01y\x01\x03\x01@\x01\x04self\x17\0.\x04\0'[method]tcp-socket.get-keep-alive-c\ -ount\x01/\x01@\x02\x04self\x17\x05valuey\0\x18\x04\0'[method]tcp-socket.set-keep\ --alive-count\x010\x01j\x01}\x01\x03\x01@\x01\x04self\x17\01\x04\0\x20[method]tcp\ --socket.get-hop-limit\x012\x01@\x02\x04self\x17\x05value}\0\x18\x04\0\x20[method\ -]tcp-socket.set-hop-limit\x013\x01j\x01w\x01\x03\x01@\x01\x04self\x17\04\x04\0*[\ -method]tcp-socket.get-receive-buffer-size\x015\x04\0*[method]tcp-socket.set-rece\ -ive-buffer-size\x01'\x04\0'[method]tcp-socket.get-send-buffer-size\x015\x04\0'[m\ -ethod]tcp-socket.set-send-buffer-size\x01'\x01i\x13\x01j\x016\x01\x03\x01@\x01\x0e\ -address-family\x05\07\x04\0\x19[static]udp-socket.create\x018\x01h\x13\x01@\x02\x04\ -self9\x0dlocal-address\x11\0\x18\x04\0\x17[method]udp-socket.bind\x01:\x01@\x02\x04\ -self9\x0eremote-address\x11\0\x18\x04\0\x1a[method]udp-socket.connect\x01;\x01@\x01\ -\x04self9\0\x18\x04\0\x1d[method]udp-socket.disconnect\x01<\x01p}\x01k\x11\x01C\x03\ -\x04self9\x04data=\x0eremote-address>\0\x18\x04\0\x17[method]udp-socket.send\x01\ -?\x01o\x02=\x11\x01j\x01\xc0\0\x01\x03\x01C\x01\x04self9\0\xc1\0\x04\0\x1a[metho\ -d]udp-socket.receive\x01B\x01@\x01\x04self9\0#\x04\0$[method]udp-socket.get-loca\ -l-address\x01C\x04\0%[method]udp-socket.get-remote-address\x01C\x01@\x01\x04self\ -9\0\x05\x04\0%[method]udp-socket.get-address-family\x01D\x01@\x01\x04self9\01\x04\ -\0([method]udp-socket.get-unicast-hop-limit\x01E\x01@\x02\x04self9\x05value}\0\x18\ -\x04\0([method]udp-socket.set-unicast-hop-limit\x01F\x01@\x01\x04self9\04\x04\0*\ -[method]udp-socket.get-receive-buffer-size\x01G\x01@\x02\x04self9\x05valuew\0\x18\ -\x04\0*[method]udp-socket.set-receive-buffer-size\x01H\x04\0'[method]udp-socket.\ -get-send-buffer-size\x01G\x04\0'[method]udp-socket.set-send-buffer-size\x01H\x03\ -\0&wasi:sockets/types@0.3.0-rc-2026-02-09\x05\x16\x02\x03\0\x10\x0aip-address\x01\ -B\x08\x02\x03\x02\x01\x17\x04\0\x0aip-address\x03\0\0\x01m\x06\x07unknown\x0dacc\ -ess-denied\x10invalid-argument\x11name-unresolvable\x1atemporary-resolver-failur\ -e\x1apermanent-resolver-failure\x04\0\x0aerror-code\x03\0\x02\x01p\x01\x01j\x01\x04\ -\x01\x03\x01C\x01\x04names\0\x05\x04\0\x11resolve-addresses\x01\x06\x03\0/wasi:s\ -ockets/ip-name-lookup@0.3.0-rc-2026-02-09\x05\x18\x01B\x05\x01p}\x01@\x01\x03len\ -w\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget-random-u64\x01\x02\ -\x03\0&wasi:random/random@0.3.0-rc-2026-02-09\x05\x19\x01B\x05\x01p}\x01@\x01\x03\ -lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01@\0\0w\x04\0\x17get-insec\ -ure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0-rc-2026-02-09\x05\x1a\x01\ -B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\x03\0-wasi:random\ -/insecure-seed@0.3.0-rc-2026-02-09\x05\x1b\x04\0Dwasi:cli/command-with-all-of-it\ -s-exports-removed@0.3.0-rc-2026-02-09\x04\0\x0b-\x01\0'command-with-all-of-its-e\ -xports-removed\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x07\ -0.245.0\x10wit-bindgen-rust\x060.53.0"; +t-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-03-15\x05\x11\x02\ +\x03\0\x0d\x07instant\x01BZ\x02\x03\x02\x01\x12\x04\0\x07instant\x03\0\0\x01w\x04\ +\0\x08filesize\x03\0\x02\x01ks\x01q\x08\x0cblock-device\0\0\x10character-device\0\ +\0\x09directory\0\0\x04fifo\0\0\x0dsymbolic-link\0\0\x0cregular-file\0\0\x06sock\ +et\0\0\x05other\x01\x04\0\x04\0\x0fdescriptor-type\x03\0\x05\x01n\x06\x04read\x05\ +write\x13file-integrity-sync\x13data-integrity-sync\x14requested-write-sync\x10m\ +utate-directory\x04\0\x10descriptor-flags\x03\0\x07\x01n\x01\x0esymlink-follow\x04\ +\0\x0apath-flags\x03\0\x09\x01n\x04\x06create\x09directory\x09exclusive\x08trunc\ +ate\x04\0\x0aopen-flags\x03\0\x0b\x01w\x04\0\x0alink-count\x03\0\x0d\x01k\x01\x01\ +r\x06\x04type\x06\x0alink-count\x0e\x04size\x03\x15data-access-timestamp\x0f\x1b\ +data-modification-timestamp\x0f\x17status-change-timestamp\x0f\x04\0\x0fdescript\ +or-stat\x03\0\x10\x01q\x03\x09no-change\0\0\x03now\0\0\x09timestamp\x01\x01\0\x04\ +\0\x0dnew-timestamp\x03\0\x12\x01r\x02\x04type\x06\x04names\x04\0\x0fdirectory-e\ +ntry\x03\0\x14\x01q%\x06access\0\0\x07already\0\0\x0ebad-descriptor\0\0\x04busy\0\ +\0\x08deadlock\0\0\x05quota\0\0\x05exist\0\0\x0efile-too-large\0\0\x15illegal-by\ +te-sequence\0\0\x0bin-progress\0\0\x0binterrupted\0\0\x07invalid\0\0\x02io\0\0\x0c\ +is-directory\0\0\x04loop\0\0\x0etoo-many-links\0\0\x0cmessage-size\0\0\x0dname-t\ +oo-long\0\0\x09no-device\0\0\x08no-entry\0\0\x07no-lock\0\0\x13insufficient-memo\ +ry\0\0\x12insufficient-space\0\0\x0dnot-directory\0\0\x09not-empty\0\0\x0fnot-re\ +coverable\0\0\x0bunsupported\0\0\x06no-tty\0\0\x0eno-such-device\0\0\x08overflow\ +\0\0\x0dnot-permitted\0\0\x04pipe\0\0\x09read-only\0\0\x0cinvalid-seek\0\0\x0ete\ +xt-file-busy\0\0\x0ccross-device\0\0\x05other\x01\x04\0\x04\0\x0aerror-code\x03\0\ +\x16\x01m\x06\x06normal\x0asequential\x06random\x09will-need\x09dont-need\x08no-\ +reuse\x04\0\x06advice\x03\0\x18\x01r\x02\x05lowerw\x05upperw\x04\0\x13metadata-h\ +ash-value\x03\0\x1a\x04\0\x0adescriptor\x03\x01\x01h\x1c\x01f\x01}\x01j\0\x01\x17\ +\x01e\x01\x1f\x01o\x02\x1e\x20\x01@\x02\x04self\x1d\x06offset\x03\0!\x04\0\"[met\ +hod]descriptor.read-via-stream\x01\"\x01@\x03\x04self\x1d\x04data\x1e\x06offset\x03\ +\0\x20\x04\0#[method]descriptor.write-via-stream\x01#\x01@\x02\x04self\x1d\x04da\ +ta\x1e\0\x20\x04\0$[method]descriptor.append-via-stream\x01$\x01C\x04\x04self\x1d\ +\x06offset\x03\x06length\x03\x06advice\x19\0\x1f\x04\0\x19[method]descriptor.adv\ +ise\x01%\x01C\x01\x04self\x1d\0\x1f\x04\0\x1c[method]descriptor.sync-data\x01&\x01\ +j\x01\x08\x01\x17\x01C\x01\x04self\x1d\0'\x04\0\x1c[method]descriptor.get-flags\x01\ +(\x01j\x01\x06\x01\x17\x01C\x01\x04self\x1d\0)\x04\0\x1b[method]descriptor.get-t\ +ype\x01*\x01C\x02\x04self\x1d\x04size\x03\0\x1f\x04\0\x1b[method]descriptor.set-\ +size\x01+\x01C\x03\x04self\x1d\x15data-access-timestamp\x13\x1bdata-modification\ +-timestamp\x13\0\x1f\x04\0\x1c[method]descriptor.set-times\x01,\x01f\x01\x15\x01\ +o\x02-\x20\x01@\x01\x04self\x1d\0.\x04\0![method]descriptor.read-directory\x01/\x04\ +\0\x17[method]descriptor.sync\x01&\x01C\x02\x04self\x1d\x04paths\0\x1f\x04\0&[me\ +thod]descriptor.create-directory-at\x010\x01j\x01\x11\x01\x17\x01C\x01\x04self\x1d\ +\01\x04\0\x17[method]descriptor.stat\x012\x01C\x03\x04self\x1d\x0apath-flags\x0a\ +\x04paths\01\x04\0\x1a[method]descriptor.stat-at\x013\x01C\x05\x04self\x1d\x0apa\ +th-flags\x0a\x04paths\x15data-access-timestamp\x13\x1bdata-modification-timestam\ +p\x13\0\x1f\x04\0\x1f[method]descriptor.set-times-at\x014\x01C\x05\x04self\x1d\x0e\ +old-path-flags\x0a\x08old-paths\x0enew-descriptor\x1d\x08new-paths\0\x1f\x04\0\x1a\ +[method]descriptor.link-at\x015\x01i\x1c\x01j\x016\x01\x17\x01C\x05\x04self\x1d\x0a\ +path-flags\x0a\x04paths\x0aopen-flags\x0c\x05flags\x08\07\x04\0\x1a[method]descr\ +iptor.open-at\x018\x01j\x01s\x01\x17\x01C\x02\x04self\x1d\x04paths\09\x04\0\x1e[\ +method]descriptor.readlink-at\x01:\x04\0&[method]descriptor.remove-directory-at\x01\ +0\x01C\x04\x04self\x1d\x08old-paths\x0enew-descriptor\x1d\x08new-paths\0\x1f\x04\ +\0\x1c[method]descriptor.rename-at\x01;\x01C\x03\x04self\x1d\x08old-paths\x08new\ +-paths\0\x1f\x04\0\x1d[method]descriptor.symlink-at\x01<\x04\0![method]descripto\ +r.unlink-file-at\x010\x01C\x02\x04self\x1d\x05other\x1d\0\x7f\x04\0![method]desc\ +riptor.is-same-object\x01=\x01j\x01\x1b\x01\x17\x01C\x01\x04self\x1d\0>\x04\0\x20\ +[method]descriptor.metadata-hash\x01?\x01C\x03\x04self\x1d\x0apath-flags\x0a\x04\ +paths\0>\x04\0#[method]descriptor.metadata-hash-at\x01@\x03\0)wasi:filesystem/ty\ +pes@0.3.0-rc-2026-03-15\x05\x13\x02\x03\0\x0e\x0adescriptor\x01B\x07\x02\x03\x02\ +\x01\x14\x04\0\x0adescriptor\x03\0\0\x01i\x01\x01o\x02\x02s\x01p\x03\x01@\0\0\x04\ +\x04\0\x0fget-directories\x01\x05\x03\0,wasi:filesystem/preopens@0.3.0-rc-2026-0\ +3-15\x05\x15\x01Br\x02\x03\x02\x01\x0f\x04\0\x08duration\x03\0\0\x01ks\x01q\x0f\x0d\ +access-denied\0\0\x0dnot-supported\0\0\x10invalid-argument\0\0\x0dout-of-memory\0\ +\0\x07timeout\0\0\x0dinvalid-state\0\0\x14address-not-bindable\0\0\x0eaddress-in\ +-use\0\0\x12remote-unreachable\0\0\x12connection-refused\0\0\x11connection-broke\ +n\0\0\x10connection-reset\0\0\x12connection-aborted\0\0\x12datagram-too-large\0\0\ +\x05other\x01\x02\0\x04\0\x0aerror-code\x03\0\x03\x01m\x02\x04ipv4\x04ipv6\x04\0\ +\x11ip-address-family\x03\0\x05\x01o\x04}}}}\x04\0\x0cipv4-address\x03\0\x07\x01\ +o\x08{{{{{{{{\x04\0\x0cipv6-address\x03\0\x09\x01q\x02\x04ipv4\x01\x08\0\x04ipv6\ +\x01\x0a\0\x04\0\x0aip-address\x03\0\x0b\x01r\x02\x04port{\x07address\x08\x04\0\x13\ +ipv4-socket-address\x03\0\x0d\x01r\x04\x04port{\x09flow-infoy\x07address\x0a\x08\ +scope-idy\x04\0\x13ipv6-socket-address\x03\0\x0f\x01q\x02\x04ipv4\x01\x0e\0\x04i\ +pv6\x01\x10\0\x04\0\x11ip-socket-address\x03\0\x11\x04\0\x0atcp-socket\x03\x01\x04\ +\0\x0audp-socket\x03\x01\x01i\x13\x01j\x01\x15\x01\x04\x01@\x01\x0eaddress-famil\ +y\x06\0\x16\x04\0\x19[static]tcp-socket.create\x01\x17\x01h\x13\x01j\0\x01\x04\x01\ +@\x02\x04self\x18\x0dlocal-address\x12\0\x19\x04\0\x17[method]tcp-socket.bind\x01\ +\x1a\x01C\x02\x04self\x18\x0eremote-address\x12\0\x19\x04\0\x1a[method]tcp-socke\ +t.connect\x01\x1b\x01f\x01\x15\x01j\x01\x1c\x01\x04\x01@\x01\x04self\x18\0\x1d\x04\ +\0\x19[method]tcp-socket.listen\x01\x1e\x01f\x01}\x01e\x01\x19\x01@\x02\x04self\x18\ +\x04data\x1f\0\x20\x04\0\x17[method]tcp-socket.send\x01!\x01o\x02\x1f\x20\x01@\x01\ +\x04self\x18\0\"\x04\0\x1a[method]tcp-socket.receive\x01#\x01j\x01\x12\x01\x04\x01\ +@\x01\x04self\x18\0$\x04\0$[method]tcp-socket.get-local-address\x01%\x04\0%[meth\ +od]tcp-socket.get-remote-address\x01%\x01@\x01\x04self\x18\0\x7f\x04\0#[method]t\ +cp-socket.get-is-listening\x01&\x01@\x01\x04self\x18\0\x06\x04\0%[method]tcp-soc\ +ket.get-address-family\x01'\x01@\x02\x04self\x18\x05valuew\0\x19\x04\0*[method]t\ +cp-socket.set-listen-backlog-size\x01(\x01j\x01\x7f\x01\x04\x01@\x01\x04self\x18\ +\0)\x04\0)[method]tcp-socket.get-keep-alive-enabled\x01*\x01@\x02\x04self\x18\x05\ +value\x7f\0\x19\x04\0)[method]tcp-socket.set-keep-alive-enabled\x01+\x01j\x01\x01\ +\x01\x04\x01@\x01\x04self\x18\0,\x04\0+[method]tcp-socket.get-keep-alive-idle-ti\ +me\x01-\x01@\x02\x04self\x18\x05value\x01\0\x19\x04\0+[method]tcp-socket.set-kee\ +p-alive-idle-time\x01.\x04\0*[method]tcp-socket.get-keep-alive-interval\x01-\x04\ +\0*[method]tcp-socket.set-keep-alive-interval\x01.\x01j\x01y\x01\x04\x01@\x01\x04\ +self\x18\0/\x04\0'[method]tcp-socket.get-keep-alive-count\x010\x01@\x02\x04self\x18\ +\x05valuey\0\x19\x04\0'[method]tcp-socket.set-keep-alive-count\x011\x01j\x01}\x01\ +\x04\x01@\x01\x04self\x18\02\x04\0\x20[method]tcp-socket.get-hop-limit\x013\x01@\ +\x02\x04self\x18\x05value}\0\x19\x04\0\x20[method]tcp-socket.set-hop-limit\x014\x01\ +j\x01w\x01\x04\x01@\x01\x04self\x18\05\x04\0*[method]tcp-socket.get-receive-buff\ +er-size\x016\x04\0*[method]tcp-socket.set-receive-buffer-size\x01(\x04\0'[method\ +]tcp-socket.get-send-buffer-size\x016\x04\0'[method]tcp-socket.set-send-buffer-s\ +ize\x01(\x01i\x14\x01j\x017\x01\x04\x01@\x01\x0eaddress-family\x06\08\x04\0\x19[\ +static]udp-socket.create\x019\x01h\x14\x01@\x02\x04self:\x0dlocal-address\x12\0\x19\ +\x04\0\x17[method]udp-socket.bind\x01;\x01@\x02\x04self:\x0eremote-address\x12\0\ +\x19\x04\0\x1a[method]udp-socket.connect\x01<\x01@\x01\x04self:\0\x19\x04\0\x1d[\ +method]udp-socket.disconnect\x01=\x01p}\x01k\x12\x01C\x03\x04self:\x04data>\x0er\ +emote-address?\0\x19\x04\0\x17[method]udp-socket.send\x01@\x01o\x02>\x12\x01j\x01\ +\xc1\0\x01\x04\x01C\x01\x04self:\0\xc2\0\x04\0\x1a[method]udp-socket.receive\x01\ +C\x01@\x01\x04self:\0$\x04\0$[method]udp-socket.get-local-address\x01D\x04\0%[me\ +thod]udp-socket.get-remote-address\x01D\x01@\x01\x04self:\0\x06\x04\0%[method]ud\ +p-socket.get-address-family\x01E\x01@\x01\x04self:\02\x04\0([method]udp-socket.g\ +et-unicast-hop-limit\x01F\x01@\x02\x04self:\x05value}\0\x19\x04\0([method]udp-so\ +cket.set-unicast-hop-limit\x01G\x01@\x01\x04self:\05\x04\0*[method]udp-socket.ge\ +t-receive-buffer-size\x01H\x01@\x02\x04self:\x05valuew\0\x19\x04\0*[method]udp-s\ +ocket.set-receive-buffer-size\x01I\x04\0'[method]udp-socket.get-send-buffer-size\ +\x01H\x04\0'[method]udp-socket.set-send-buffer-size\x01I\x03\0&wasi:sockets/type\ +s@0.3.0-rc-2026-03-15\x05\x16\x02\x03\0\x10\x0aip-address\x01B\x09\x02\x03\x02\x01\ +\x17\x04\0\x0aip-address\x03\0\0\x01ks\x01q\x06\x0daccess-denied\0\0\x10invalid-\ +argument\0\0\x11name-unresolvable\0\0\x1atemporary-resolver-failure\0\0\x1aperma\ +nent-resolver-failure\0\0\x05other\x01\x02\0\x04\0\x0aerror-code\x03\0\x03\x01p\x01\ +\x01j\x01\x05\x01\x04\x01C\x01\x04names\0\x06\x04\0\x11resolve-addresses\x01\x07\ +\x03\0/wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15\x05\x18\x01B\x05\x01p}\x01\ +@\x01\x07max-lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget-r\ +andom-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-03-15\x05\x19\x01B\x05\x01\ +p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01@\0\0w\ +\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0-rc-20\ +26-03-15\x05\x1a\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\ +\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-03-15\x05\x1b\x04\0Dwasi:cli/comm\ +and-with-all-of-its-exports-removed@0.3.0-rc-2026-03-15\x04\0\x0b-\x01\0'command\ +-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\ +\x0dwit-component\x070.245.1\x10wit-bindgen-rust\x060.54.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { diff --git a/crates/wasip3/src/imports.rs b/crates/wasip3/src/imports.rs index 5ef119c..95c35fc 100644 --- a/crates/wasip3/src/imports.rs +++ b/crates/wasip3/src/imports.rs @@ -1,6 +1,6 @@ -// Generated by `wit-bindgen` 0.53.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.54.0. DO NOT EDIT! // Options used: -// * type_section_suffix: "rust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io" +// * type_section_suffix: "rust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io" #[rustfmt::skip] #[allow(dead_code, clippy::all)] pub mod wasi { @@ -37,7 +37,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/environment@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/environment@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-environment"] @@ -105,7 +105,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/environment@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/environment@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-arguments"] @@ -166,7 +166,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/environment@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/environment@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-initial-cwd"] @@ -219,7 +219,7 @@ pub mod wasi { Err(_) => 1i32, }; #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/exit@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:cli/exit@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "exit"] fn wit_import1(_: i32); @@ -308,7 +308,7 @@ pub mod wasi { let mut ret_area = RetArea([::core::mem::MaybeUninit::uninit(); 8]); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stdin@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:cli/stdin@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "read-via-stream"] fn wit_import1(_: *mut u8); @@ -358,7 +358,7 @@ pub mod wasi { ) -> wit_bindgen::rt::async_support::FutureReader> { unsafe { #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stdout@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:cli/stdout@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "write-via-stream"] fn wit_import0(_: i32) -> i32; @@ -399,7 +399,7 @@ pub mod wasi { ) -> wit_bindgen::rt::async_support::FutureReader> { unsafe { #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stderr@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:cli/stderr@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "write-via-stream"] fn wit_import0(_: i32) -> i32; @@ -457,7 +457,7 @@ pub mod wasi { unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/terminal-input@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/terminal-input@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[resource-drop]terminal-input"] @@ -511,7 +511,7 @@ pub mod wasi { unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/terminal-output@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/terminal-output@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[resource-drop]terminal-output"] @@ -548,7 +548,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/terminal-stdin@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/terminal-stdin@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-terminal-stdin"] @@ -598,7 +598,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/terminal-stdout@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/terminal-stdout@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-terminal-stdout"] @@ -648,7 +648,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:cli/terminal-stderr@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:cli/terminal-stderr@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-terminal-stderr"] @@ -722,7 +722,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "now"] @@ -744,7 +744,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-resolution"] @@ -790,7 +790,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower]wait-until"] @@ -865,7 +865,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower]wait-for"] @@ -974,7 +974,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:clocks/system-clock@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:clocks/system-clock@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "now"] @@ -1002,7 +1002,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:clocks/system-clock@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:clocks/system-clock@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-resolution"] @@ -1066,12 +1066,8 @@ pub mod wasi { /// The type of a filesystem object referenced by a descriptor. /// /// Note: This was called `filetype` in earlier versions of WASI. - #[repr(u8)] - #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] + #[derive(Clone)] pub enum DescriptorType { - /// The type of the descriptor or file is unknown or is different from - /// any of the other types specified. - Unknown, /// The descriptor refers to a block device inode. BlockDevice, /// The descriptor refers to a character device inode. @@ -1086,6 +1082,9 @@ pub mod wasi { RegularFile, /// The descriptor refers to a socket. Socket, + /// The type of the descriptor or file is different from any of the + /// other types specified. + Other(Option<_rt::String>), } impl ::core::fmt::Debug for DescriptorType { fn fmt( @@ -1093,9 +1092,6 @@ pub mod wasi { f: &mut ::core::fmt::Formatter<'_>, ) -> ::core::fmt::Result { match self { - DescriptorType::Unknown => { - f.debug_tuple("DescriptorType::Unknown").finish() - } DescriptorType::BlockDevice => { f.debug_tuple("DescriptorType::BlockDevice").finish() } @@ -1117,25 +1113,9 @@ pub mod wasi { DescriptorType::Socket => { f.debug_tuple("DescriptorType::Socket").finish() } - } - } - } - impl DescriptorType { - #[doc(hidden)] - pub unsafe fn _lift(val: u8) -> DescriptorType { - if !cfg!(debug_assertions) { - return unsafe { ::core::mem::transmute(val) }; - } - match val { - 0 => DescriptorType::Unknown, - 1 => DescriptorType::BlockDevice, - 2 => DescriptorType::CharacterDevice, - 3 => DescriptorType::Directory, - 4 => DescriptorType::Fifo, - 5 => DescriptorType::SymbolicLink, - 6 => DescriptorType::RegularFile, - 7 => DescriptorType::Socket, - _ => panic!("invalid enum discriminant"), + DescriptorType::Other(e) => { + f.debug_tuple("DescriptorType::Other").field(e).finish() + } } } } @@ -1208,8 +1188,7 @@ pub mod wasi { /// File attributes. /// /// Note: This was called `filestat` in earlier versions of WASI. - #[repr(C)] - #[derive(Clone, Copy)] + #[derive(Clone)] pub struct DescriptorStat { /// File type. pub type_: DescriptorType, @@ -1302,8 +1281,7 @@ pub mod wasi { /// Not all of these error codes are returned by the functions provided by this /// API; some are used in higher-level library layers, and others are provided /// merely for alignment with POSIX. - #[repr(u8)] - #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] + #[derive(Clone)] pub enum ErrorCode { /// Permission denied, similar to `EACCES` in POSIX. Access, @@ -1377,223 +1355,122 @@ pub mod wasi { TextFileBusy, /// Cross-device link, similar to `EXDEV` in POSIX. CrossDevice, + /// A catch-all for errors not captured by the existing variants. + /// Implementations can use this to extend the error type without + /// breaking existing code. + Other(Option<_rt::String>), } - impl ErrorCode { - pub fn name(&self) -> &'static str { - match self { - ErrorCode::Access => "access", - ErrorCode::Already => "already", - ErrorCode::BadDescriptor => "bad-descriptor", - ErrorCode::Busy => "busy", - ErrorCode::Deadlock => "deadlock", - ErrorCode::Quota => "quota", - ErrorCode::Exist => "exist", - ErrorCode::FileTooLarge => "file-too-large", - ErrorCode::IllegalByteSequence => "illegal-byte-sequence", - ErrorCode::InProgress => "in-progress", - ErrorCode::Interrupted => "interrupted", - ErrorCode::Invalid => "invalid", - ErrorCode::Io => "io", - ErrorCode::IsDirectory => "is-directory", - ErrorCode::Loop => "loop", - ErrorCode::TooManyLinks => "too-many-links", - ErrorCode::MessageSize => "message-size", - ErrorCode::NameTooLong => "name-too-long", - ErrorCode::NoDevice => "no-device", - ErrorCode::NoEntry => "no-entry", - ErrorCode::NoLock => "no-lock", - ErrorCode::InsufficientMemory => "insufficient-memory", - ErrorCode::InsufficientSpace => "insufficient-space", - ErrorCode::NotDirectory => "not-directory", - ErrorCode::NotEmpty => "not-empty", - ErrorCode::NotRecoverable => "not-recoverable", - ErrorCode::Unsupported => "unsupported", - ErrorCode::NoTty => "no-tty", - ErrorCode::NoSuchDevice => "no-such-device", - ErrorCode::Overflow => "overflow", - ErrorCode::NotPermitted => "not-permitted", - ErrorCode::Pipe => "pipe", - ErrorCode::ReadOnly => "read-only", - ErrorCode::InvalidSeek => "invalid-seek", - ErrorCode::TextFileBusy => "text-file-busy", - ErrorCode::CrossDevice => "cross-device", - } - } - pub fn message(&self) -> &'static str { + impl ::core::fmt::Debug for ErrorCode { + fn fmt( + &self, + f: &mut ::core::fmt::Formatter<'_>, + ) -> ::core::fmt::Result { match self { - ErrorCode::Access => { - "Permission denied, similar to `EACCES` in POSIX." - } + ErrorCode::Access => f.debug_tuple("ErrorCode::Access").finish(), ErrorCode::Already => { - "Connection already in progress, similar to `EALREADY` in POSIX." + f.debug_tuple("ErrorCode::Already").finish() } ErrorCode::BadDescriptor => { - "Bad descriptor, similar to `EBADF` in POSIX." - } - ErrorCode::Busy => { - "Device or resource busy, similar to `EBUSY` in POSIX." + f.debug_tuple("ErrorCode::BadDescriptor").finish() } + ErrorCode::Busy => f.debug_tuple("ErrorCode::Busy").finish(), ErrorCode::Deadlock => { - "Resource deadlock would occur, similar to `EDEADLK` in POSIX." - } - ErrorCode::Quota => { - "Storage quota exceeded, similar to `EDQUOT` in POSIX." + f.debug_tuple("ErrorCode::Deadlock").finish() } - ErrorCode::Exist => "File exists, similar to `EEXIST` in POSIX.", + ErrorCode::Quota => f.debug_tuple("ErrorCode::Quota").finish(), + ErrorCode::Exist => f.debug_tuple("ErrorCode::Exist").finish(), ErrorCode::FileTooLarge => { - "File too large, similar to `EFBIG` in POSIX." + f.debug_tuple("ErrorCode::FileTooLarge").finish() } ErrorCode::IllegalByteSequence => { - "Illegal byte sequence, similar to `EILSEQ` in POSIX." + f.debug_tuple("ErrorCode::IllegalByteSequence").finish() } ErrorCode::InProgress => { - "Operation in progress, similar to `EINPROGRESS` in POSIX." + f.debug_tuple("ErrorCode::InProgress").finish() } ErrorCode::Interrupted => { - "Interrupted function, similar to `EINTR` in POSIX." + f.debug_tuple("ErrorCode::Interrupted").finish() } ErrorCode::Invalid => { - "Invalid argument, similar to `EINVAL` in POSIX." + f.debug_tuple("ErrorCode::Invalid").finish() } - ErrorCode::Io => "I/O error, similar to `EIO` in POSIX.", + ErrorCode::Io => f.debug_tuple("ErrorCode::Io").finish(), ErrorCode::IsDirectory => { - "Is a directory, similar to `EISDIR` in POSIX." - } - ErrorCode::Loop => { - "Too many levels of symbolic links, similar to `ELOOP` in POSIX." + f.debug_tuple("ErrorCode::IsDirectory").finish() } + ErrorCode::Loop => f.debug_tuple("ErrorCode::Loop").finish(), ErrorCode::TooManyLinks => { - "Too many links, similar to `EMLINK` in POSIX." + f.debug_tuple("ErrorCode::TooManyLinks").finish() } ErrorCode::MessageSize => { - "Message too large, similar to `EMSGSIZE` in POSIX." + f.debug_tuple("ErrorCode::MessageSize").finish() } ErrorCode::NameTooLong => { - "Filename too long, similar to `ENAMETOOLONG` in POSIX." + f.debug_tuple("ErrorCode::NameTooLong").finish() } ErrorCode::NoDevice => { - "No such device, similar to `ENODEV` in POSIX." + f.debug_tuple("ErrorCode::NoDevice").finish() } ErrorCode::NoEntry => { - "No such file or directory, similar to `ENOENT` in POSIX." - } - ErrorCode::NoLock => { - "No locks available, similar to `ENOLCK` in POSIX." + f.debug_tuple("ErrorCode::NoEntry").finish() } + ErrorCode::NoLock => f.debug_tuple("ErrorCode::NoLock").finish(), ErrorCode::InsufficientMemory => { - "Not enough space, similar to `ENOMEM` in POSIX." + f.debug_tuple("ErrorCode::InsufficientMemory").finish() } ErrorCode::InsufficientSpace => { - "No space left on device, similar to `ENOSPC` in POSIX." + f.debug_tuple("ErrorCode::InsufficientSpace").finish() } ErrorCode::NotDirectory => { - "Not a directory or a symbolic link to a directory, similar to `ENOTDIR` in POSIX." + f.debug_tuple("ErrorCode::NotDirectory").finish() } ErrorCode::NotEmpty => { - "Directory not empty, similar to `ENOTEMPTY` in POSIX." + f.debug_tuple("ErrorCode::NotEmpty").finish() } ErrorCode::NotRecoverable => { - "State not recoverable, similar to `ENOTRECOVERABLE` in POSIX." + f.debug_tuple("ErrorCode::NotRecoverable").finish() } ErrorCode::Unsupported => { - "Not supported, similar to `ENOTSUP` and `ENOSYS` in POSIX." - } - ErrorCode::NoTty => { - "Inappropriate I/O control operation, similar to `ENOTTY` in POSIX." + f.debug_tuple("ErrorCode::Unsupported").finish() } + ErrorCode::NoTty => f.debug_tuple("ErrorCode::NoTty").finish(), ErrorCode::NoSuchDevice => { - "No such device or address, similar to `ENXIO` in POSIX." + f.debug_tuple("ErrorCode::NoSuchDevice").finish() } ErrorCode::Overflow => { - "Value too large to be stored in data type, similar to `EOVERFLOW` in POSIX." + f.debug_tuple("ErrorCode::Overflow").finish() } ErrorCode::NotPermitted => { - "Operation not permitted, similar to `EPERM` in POSIX." + f.debug_tuple("ErrorCode::NotPermitted").finish() } - ErrorCode::Pipe => "Broken pipe, similar to `EPIPE` in POSIX.", + ErrorCode::Pipe => f.debug_tuple("ErrorCode::Pipe").finish(), ErrorCode::ReadOnly => { - "Read-only file system, similar to `EROFS` in POSIX." + f.debug_tuple("ErrorCode::ReadOnly").finish() } ErrorCode::InvalidSeek => { - "Invalid seek, similar to `ESPIPE` in POSIX." + f.debug_tuple("ErrorCode::InvalidSeek").finish() } ErrorCode::TextFileBusy => { - "Text file busy, similar to `ETXTBSY` in POSIX." + f.debug_tuple("ErrorCode::TextFileBusy").finish() } ErrorCode::CrossDevice => { - "Cross-device link, similar to `EXDEV` in POSIX." + f.debug_tuple("ErrorCode::CrossDevice").finish() + } + ErrorCode::Other(e) => { + f.debug_tuple("ErrorCode::Other").field(e).finish() } } } } - impl ::core::fmt::Debug for ErrorCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { - f.debug_struct("ErrorCode") - .field("code", &(*self as i32)) - .field("name", &self.name()) - .field("message", &self.message()) - .finish() - } - } impl ::core::fmt::Display for ErrorCode { fn fmt( &self, f: &mut ::core::fmt::Formatter<'_>, ) -> ::core::fmt::Result { - write!(f, "{} (error {})", self.name(), * self as i32) + write!(f, "{:?}", self) } } impl ::core::error::Error for ErrorCode {} - impl ErrorCode { - #[doc(hidden)] - pub unsafe fn _lift(val: u8) -> ErrorCode { - if !cfg!(debug_assertions) { - return unsafe { ::core::mem::transmute(val) }; - } - match val { - 0 => ErrorCode::Access, - 1 => ErrorCode::Already, - 2 => ErrorCode::BadDescriptor, - 3 => ErrorCode::Busy, - 4 => ErrorCode::Deadlock, - 5 => ErrorCode::Quota, - 6 => ErrorCode::Exist, - 7 => ErrorCode::FileTooLarge, - 8 => ErrorCode::IllegalByteSequence, - 9 => ErrorCode::InProgress, - 10 => ErrorCode::Interrupted, - 11 => ErrorCode::Invalid, - 12 => ErrorCode::Io, - 13 => ErrorCode::IsDirectory, - 14 => ErrorCode::Loop, - 15 => ErrorCode::TooManyLinks, - 16 => ErrorCode::MessageSize, - 17 => ErrorCode::NameTooLong, - 18 => ErrorCode::NoDevice, - 19 => ErrorCode::NoEntry, - 20 => ErrorCode::NoLock, - 21 => ErrorCode::InsufficientMemory, - 22 => ErrorCode::InsufficientSpace, - 23 => ErrorCode::NotDirectory, - 24 => ErrorCode::NotEmpty, - 25 => ErrorCode::NotRecoverable, - 26 => ErrorCode::Unsupported, - 27 => ErrorCode::NoTty, - 28 => ErrorCode::NoSuchDevice, - 29 => ErrorCode::Overflow, - 30 => ErrorCode::NotPermitted, - 31 => ErrorCode::Pipe, - 32 => ErrorCode::ReadOnly, - 33 => ErrorCode::InvalidSeek, - 34 => ErrorCode::TextFileBusy, - 35 => ErrorCode::CrossDevice, - _ => panic!("invalid enum discriminant"), - } - } - } /// File or memory access pattern advisory information. #[repr(u8)] #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] @@ -1701,7 +1578,7 @@ pub mod wasi { unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[resource-drop]descriptor"] @@ -1751,7 +1628,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]descriptor.read-via-stream"] @@ -1806,7 +1683,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]descriptor.write-via-stream"] @@ -1851,7 +1728,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]descriptor.append-via-stream"] @@ -1902,7 +1779,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -1915,7 +1795,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.advise"] @@ -1975,8 +1855,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -2018,7 +1971,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -2031,7 +1987,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.sync-data"] @@ -2075,8 +2031,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -2118,7 +2147,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -2131,7 +2163,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.get-flags"] @@ -2171,7 +2203,9 @@ pub mod wasi { match l0 { 0 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); DescriptorFlags::empty() | DescriptorFlags::from_bits_retain(((l1 as u8) << 0) as _) }; @@ -2179,8 +2213,81 @@ pub mod wasi { } 1 => { let e = { - let l2 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l2 as u8) + let l2 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v7 = match l2 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e7 = { + let l3 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l3 { + 0 => None, + 1 => { + let e = { + let l4 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l5 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len6 = l5; + let bytes6 = _rt::Vec::from_raw_parts( + l4.cast(), + len6, + len6, + ); + _rt::string_lift(bytes6) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e7) + } + }; + v7 }; Err(e) } @@ -2226,7 +2333,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -2239,7 +2349,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.get-type"] @@ -2279,15 +2389,132 @@ pub mod wasi { match l0 { 0 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - DescriptorType::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => DescriptorType::BlockDevice, + 1 => DescriptorType::CharacterDevice, + 2 => DescriptorType::Directory, + 3 => DescriptorType::Fifo, + 4 => DescriptorType::SymbolicLink, + 5 => DescriptorType::RegularFile, + 6 => DescriptorType::Socket, + n => { + debug_assert_eq!(n, 7, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + DescriptorType::Other(e6) + } + }; + v6 }; Ok(e) } 1 => { let e = { - let l2 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l2 as u8) + let l7 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v12 = match l7 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e12 = { + let l8 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l8 { + 0 => None, + 1 => { + let e = { + let l9 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l10 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len11 = l10; + let bytes11 = _rt::Vec::from_raw_parts( + l9.cast(), + len11, + len11, + ); + _rt::string_lift(bytes11) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e12) + } + }; + v12 }; Err(e) } @@ -2327,7 +2554,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -2340,7 +2570,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.set-size"] @@ -2390,8 +2620,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -2436,7 +2739,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(64, 8) + ::core::alloc::Layout::from_size_align_unchecked( + (64 + 4 * ::core::mem::size_of::<*const u8>()), + 8, + ) } } fn results_offset(&mut self) -> usize { @@ -2449,7 +2755,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.set-times"] @@ -2542,8 +2848,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -2594,7 +2973,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]descriptor.read-directory"] @@ -2649,7 +3028,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -2662,7 +3044,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.sync"] @@ -2706,8 +3088,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -2749,7 +3204,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -2762,7 +3220,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.create-directory-at"] @@ -2827,8 +3285,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -2873,7 +3404,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(104, 8) + ::core::alloc::Layout::from_size_align_unchecked( + (96 + 4 * ::core::mem::size_of::<*const u8>()), + 8, + ) } } fn results_offset(&mut self) -> usize { @@ -2886,7 +3420,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.stat"] @@ -2927,54 +3461,124 @@ pub mod wasi { 0 => { let e = { let l1 = i32::from(*_ptr.add(8).cast::()); - let l2 = *_ptr.add(16).cast::(); - let l3 = *_ptr.add(24).cast::(); - let l4 = i32::from(*_ptr.add(32).cast::()); - let l7 = i32::from(*_ptr.add(56).cast::()); - let l10 = i32::from(*_ptr.add(80).cast::()); + let v6 = match l1 { + 0 => DescriptorType::BlockDevice, + 1 => DescriptorType::CharacterDevice, + 2 => DescriptorType::Directory, + 3 => DescriptorType::Fifo, + 4 => DescriptorType::SymbolicLink, + 5 => DescriptorType::RegularFile, + 6 => DescriptorType::Socket, + n => { + debug_assert_eq!(n, 7, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + DescriptorType::Other(e6) + } + }; + let l7 = *_ptr + .add(8 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l8 = *_ptr + .add(16 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l9 = i32::from( + *_ptr + .add(24 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l12 = i32::from( + *_ptr + .add(48 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l15 = i32::from( + *_ptr + .add(72 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); DescriptorStat { - type_: DescriptorType::_lift(l1 as u8), - link_count: l2 as u64, - size: l3 as u64, - data_access_timestamp: match l4 { + type_: v6, + link_count: l7 as u64, + size: l8 as u64, + data_access_timestamp: match l9 { 0 => None, 1 => { let e = { - let l5 = *_ptr.add(40).cast::(); - let l6 = *_ptr.add(48).cast::(); + let l10 = *_ptr + .add(32 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l11 = *_ptr + .add(40 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); super::super::super::wasi::clocks::system_clock::Instant { - seconds: l5, - nanoseconds: l6 as u32, + seconds: l10, + nanoseconds: l11 as u32, } }; Some(e) } _ => _rt::invalid_enum_discriminant(), }, - data_modification_timestamp: match l7 { + data_modification_timestamp: match l12 { 0 => None, 1 => { let e = { - let l8 = *_ptr.add(64).cast::(); - let l9 = *_ptr.add(72).cast::(); + let l13 = *_ptr + .add(56 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l14 = *_ptr + .add(64 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); super::super::super::wasi::clocks::system_clock::Instant { - seconds: l8, - nanoseconds: l9 as u32, + seconds: l13, + nanoseconds: l14 as u32, } }; Some(e) } _ => _rt::invalid_enum_discriminant(), }, - status_change_timestamp: match l10 { + status_change_timestamp: match l15 { 0 => None, 1 => { let e = { - let l11 = *_ptr.add(88).cast::(); - let l12 = *_ptr.add(96).cast::(); + let l16 = *_ptr + .add(80 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l17 = *_ptr + .add(88 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); super::super::super::wasi::clocks::system_clock::Instant { - seconds: l11, - nanoseconds: l12 as u32, + seconds: l16, + nanoseconds: l17 as u32, } }; Some(e) @@ -2987,8 +3591,79 @@ pub mod wasi { } 1 => { let e = { - let l13 = i32::from(*_ptr.add(8).cast::()); - ErrorCode::_lift(l13 as u8) + let l18 = i32::from(*_ptr.add(8).cast::()); + let v23 = match l18 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e23 = { + let l19 = i32::from( + *_ptr + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l19 { + 0 => None, + 1 => { + let e = { + let l20 = *_ptr + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l21 = *_ptr + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len22 = l21; + let bytes22 = _rt::Vec::from_raw_parts( + l20.cast(), + len22, + len22, + ); + _rt::string_lift(bytes22) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e23) + } + }; + v23 }; Err(e) } @@ -3035,7 +3710,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(104, 8) + ::core::alloc::Layout::from_size_align_unchecked( + (96 + 4 * ::core::mem::size_of::<*const u8>()), + 8, + ) } } fn results_offset(&mut self) -> usize { @@ -3048,7 +3726,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.stat-at"] @@ -3120,54 +3798,124 @@ pub mod wasi { 0 => { let e = { let l1 = i32::from(*_ptr.add(8).cast::()); - let l2 = *_ptr.add(16).cast::(); - let l3 = *_ptr.add(24).cast::(); - let l4 = i32::from(*_ptr.add(32).cast::()); - let l7 = i32::from(*_ptr.add(56).cast::()); - let l10 = i32::from(*_ptr.add(80).cast::()); + let v6 = match l1 { + 0 => DescriptorType::BlockDevice, + 1 => DescriptorType::CharacterDevice, + 2 => DescriptorType::Directory, + 3 => DescriptorType::Fifo, + 4 => DescriptorType::SymbolicLink, + 5 => DescriptorType::RegularFile, + 6 => DescriptorType::Socket, + n => { + debug_assert_eq!(n, 7, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + DescriptorType::Other(e6) + } + }; + let l7 = *_ptr + .add(8 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l8 = *_ptr + .add(16 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l9 = i32::from( + *_ptr + .add(24 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l12 = i32::from( + *_ptr + .add(48 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l15 = i32::from( + *_ptr + .add(72 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); DescriptorStat { - type_: DescriptorType::_lift(l1 as u8), - link_count: l2 as u64, - size: l3 as u64, - data_access_timestamp: match l4 { + type_: v6, + link_count: l7 as u64, + size: l8 as u64, + data_access_timestamp: match l9 { 0 => None, 1 => { let e = { - let l5 = *_ptr.add(40).cast::(); - let l6 = *_ptr.add(48).cast::(); + let l10 = *_ptr + .add(32 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l11 = *_ptr + .add(40 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); super::super::super::wasi::clocks::system_clock::Instant { - seconds: l5, - nanoseconds: l6 as u32, + seconds: l10, + nanoseconds: l11 as u32, } }; Some(e) } _ => _rt::invalid_enum_discriminant(), }, - data_modification_timestamp: match l7 { + data_modification_timestamp: match l12 { 0 => None, 1 => { let e = { - let l8 = *_ptr.add(64).cast::(); - let l9 = *_ptr.add(72).cast::(); + let l13 = *_ptr + .add(56 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l14 = *_ptr + .add(64 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); super::super::super::wasi::clocks::system_clock::Instant { - seconds: l8, - nanoseconds: l9 as u32, + seconds: l13, + nanoseconds: l14 as u32, } }; Some(e) } _ => _rt::invalid_enum_discriminant(), }, - status_change_timestamp: match l10 { + status_change_timestamp: match l15 { 0 => None, 1 => { let e = { - let l11 = *_ptr.add(88).cast::(); - let l12 = *_ptr.add(96).cast::(); + let l16 = *_ptr + .add(80 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l17 = *_ptr + .add(88 + 4 * ::core::mem::size_of::<*const u8>()) + .cast::(); super::super::super::wasi::clocks::system_clock::Instant { - seconds: l11, - nanoseconds: l12 as u32, + seconds: l16, + nanoseconds: l17 as u32, } }; Some(e) @@ -3180,8 +3928,79 @@ pub mod wasi { } 1 => { let e = { - let l13 = i32::from(*_ptr.add(8).cast::()); - ErrorCode::_lift(l13 as u8) + let l18 = i32::from(*_ptr.add(8).cast::()); + let v23 = match l18 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e23 = { + let l19 = i32::from( + *_ptr + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l19 { + 0 => None, + 1 => { + let e = { + let l20 = *_ptr + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l21 = *_ptr + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len22 = l21; + let bytes22 = _rt::Vec::from_raw_parts( + l20.cast(), + len22, + len22, + ); + _rt::string_lift(bytes22) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e23) + } + }; + v23 }; Err(e) } @@ -3236,7 +4055,7 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (64 + 2 * ::core::mem::size_of::<*const u8>()), + (64 + 6 * ::core::mem::size_of::<*const u8>()), 8, ) } @@ -3251,7 +4070,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.set-times-at"] @@ -3379,18 +4198,91 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) - }; - Err(e) - } - _ => _rt::invalid_enum_discriminant(), - } - } - } - } - _MySubtask { - _unused: core::marker::PhantomData, + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 + }; + Err(e) + } + _ => _rt::invalid_enum_discriminant(), + } + } + } + } + _MySubtask { + _unused: core::marker::PhantomData, } .call(( self, @@ -3442,7 +4334,7 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (8 + 6 * ::core::mem::size_of::<*const u8>()), + (8 + 10 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } @@ -3457,7 +4349,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.link-at"] @@ -3575,8 +4467,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -3643,13 +4608,13 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (16 + 3 * ::core::mem::size_of::<*const u8>()), + (8 + 8 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } } fn results_offset(&mut self) -> usize { - (12 + 2 * ::core::mem::size_of::<*const u8>()) + (8 + 3 * ::core::mem::size_of::<*const u8>()) } unsafe fn call_import( &mut self, @@ -3658,7 +4623,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.open-at"] @@ -3750,15 +4715,90 @@ pub mod wasi { match l0 { 0 => { let e = { - let l1 = *_ptr.add(4).cast::(); + let l1 = *_ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::(); Descriptor::from_handle(l1 as u32) }; Ok(e) } 1 => { let e = { - let l2 = i32::from(*_ptr.add(4).cast::()); - ErrorCode::_lift(l2 as u8) + let l2 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v7 = match l2 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e7 = { + let l3 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l3 { + 0 => None, + 1 => { + let e = { + let l4 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l5 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len6 = l5; + let bytes6 = _rt::Vec::from_raw_parts( + l4.cast(), + len6, + len6, + ); + _rt::string_lift(bytes6) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e7) + } + }; + v7 }; Err(e) } @@ -3804,7 +4844,7 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (3 * ::core::mem::size_of::<*const u8>()), + (5 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } @@ -3819,7 +4859,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.readlink-at"] @@ -3901,7 +4941,78 @@ pub mod wasi { let l4 = i32::from( *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), ); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } @@ -3945,7 +5056,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -3958,7 +5072,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.remove-directory-at"] @@ -4023,8 +5137,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -4074,7 +5261,7 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (7 * ::core::mem::size_of::<*const u8>()), + (11 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } @@ -4089,7 +5276,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.rename-at"] @@ -4209,8 +5396,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -4257,7 +5517,7 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (6 * ::core::mem::size_of::<*const u8>()), + (10 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } @@ -4272,7 +5532,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.symlink-at"] @@ -4385,8 +5645,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -4407,8 +5740,13 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Unlink a filesystem object that is not a directory. /// - /// Return `error-code::is-directory` if the path refers to a directory. - /// Note: This is similar to `unlinkat(fd, path, 0)` in POSIX. + /// This is similar to `unlinkat(fd, path, 0)` in POSIX. + /// + /// Error returns are as specified by POSIX. + /// + /// If the filesystem object is a directory, `error-code::access` or + /// `error-code::is-directory` may be returned instead of the + /// POSIX-specified `error-code::not-permitted`. #[allow(async_fn_in_trait)] pub async fn unlink_file_at( &self, @@ -4429,7 +5767,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(2, 1) + ::core::alloc::Layout::from_size_align_unchecked( + (5 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { @@ -4442,7 +5783,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.unlink-file-at"] @@ -4507,8 +5848,81 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -4563,7 +5977,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.is-same-object"] @@ -4661,7 +6075,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(24, 8) + ::core::alloc::Layout::from_size_align_unchecked( + (8 + 4 * ::core::mem::size_of::<*const u8>()), + 8, + ) } } fn results_offset(&mut self) -> usize { @@ -4674,7 +6091,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.metadata-hash"] @@ -4726,7 +6143,78 @@ pub mod wasi { 1 => { let e = { let l3 = i32::from(*_ptr.add(8).cast::()); - ErrorCode::_lift(l3 as u8) + let v8 = match l3 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *_ptr + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *_ptr + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *_ptr + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } @@ -4770,7 +6258,10 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(24, 8) + ::core::alloc::Layout::from_size_align_unchecked( + (8 + 4 * ::core::mem::size_of::<*const u8>()), + 8, + ) } } fn results_offset(&mut self) -> usize { @@ -4783,7 +6274,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]descriptor.metadata-hash-at"] @@ -4866,7 +6357,78 @@ pub mod wasi { 1 => { let e = { let l3 = i32::from(*_ptr.add(8).cast::()); - ErrorCode::_lift(l3 as u8) + let v8 = match l3 { + 0 => ErrorCode::Access, + 1 => ErrorCode::Already, + 2 => ErrorCode::BadDescriptor, + 3 => ErrorCode::Busy, + 4 => ErrorCode::Deadlock, + 5 => ErrorCode::Quota, + 6 => ErrorCode::Exist, + 7 => ErrorCode::FileTooLarge, + 8 => ErrorCode::IllegalByteSequence, + 9 => ErrorCode::InProgress, + 10 => ErrorCode::Interrupted, + 11 => ErrorCode::Invalid, + 12 => ErrorCode::Io, + 13 => ErrorCode::IsDirectory, + 14 => ErrorCode::Loop, + 15 => ErrorCode::TooManyLinks, + 16 => ErrorCode::MessageSize, + 17 => ErrorCode::NameTooLong, + 18 => ErrorCode::NoDevice, + 19 => ErrorCode::NoEntry, + 20 => ErrorCode::NoLock, + 21 => ErrorCode::InsufficientMemory, + 22 => ErrorCode::InsufficientSpace, + 23 => ErrorCode::NotDirectory, + 24 => ErrorCode::NotEmpty, + 25 => ErrorCode::NotRecoverable, + 26 => ErrorCode::Unsupported, + 27 => ErrorCode::NoTty, + 28 => ErrorCode::NoSuchDevice, + 29 => ErrorCode::Overflow, + 30 => ErrorCode::NotPermitted, + 31 => ErrorCode::Pipe, + 32 => ErrorCode::ReadOnly, + 33 => ErrorCode::InvalidSeek, + 34 => ErrorCode::TextFileBusy, + 35 => ErrorCode::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *_ptr + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *_ptr + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *_ptr + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } @@ -4910,7 +6472,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:filesystem/preopens@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:filesystem/preopens@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-directories"] @@ -4973,7 +6535,8 @@ pub mod wasi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[allow(unused_unsafe, clippy::all)] - /// Return `len` cryptographically-secure random or pseudo-random bytes. + /// Return up to `max-len` cryptographically-secure random or pseudo-random + /// bytes. /// /// This function must produce data at least as cryptographically secure and /// fast as an adequately seeded cryptographically-secure pseudo-random @@ -4982,11 +6545,18 @@ pub mod wasi { /// request and on requests for numbers of bytes. The returned data must /// always be unpredictable. /// + /// Implementations MAY return fewer bytes than requested (a short read). + /// Callers that require exactly `max-len` bytes MUST call this function in + /// a loop until the desired number of bytes has been accumulated. + /// Implementations MUST return at least 1 byte when `max-len` is greater + /// than zero. When `max-len` is zero, implementations MUST return an empty + /// list without trapping. + /// /// This function must always return fresh data. Deterministic environments /// must omit this function, rather than implementing it with deterministic /// data. #[allow(async_fn_in_trait)] - pub fn get_random_bytes(len: u64) -> _rt::Vec { + pub fn get_random_bytes(max_len: u64) -> _rt::Vec { unsafe { #[cfg_attr(target_pointer_width = "64", repr(align(8)))] #[cfg_attr(target_pointer_width = "32", repr(align(4)))] @@ -5002,7 +6572,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:random/random@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:random/random@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-random-bytes"] @@ -5012,7 +6582,7 @@ pub mod wasi { unsafe extern "C" fn wit_import1(_: i64, _: *mut u8) { unreachable!() } - wit_import1(_rt::as_i64(&len), ptr0); + wit_import1(_rt::as_i64(&max_len), ptr0); let l2 = *ptr0.add(0).cast::<*mut u8>(); let l3 = *ptr0 .add(::core::mem::size_of::<*const u8>()) @@ -5034,7 +6604,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:random/random@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:random/random@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-random-u64"] @@ -5060,7 +6630,7 @@ pub mod wasi { static __FORCE_SECTION_REF: fn() = super::super::super::__link_custom_section_describing_imports; use super::super::super::_rt; #[allow(unused_unsafe, clippy::all)] - /// Return `len` insecure pseudo-random bytes. + /// Return up to `max-len` insecure pseudo-random bytes. /// /// This function is not cryptographically secure. Do not use it for /// anything related to security. @@ -5068,8 +6638,15 @@ pub mod wasi { /// There are no requirements on the values of the returned bytes, however /// implementations are encouraged to return evenly distributed values with /// a long period. + /// + /// Implementations MAY return fewer bytes than requested (a short read). + /// Callers that require exactly `max-len` bytes MUST call this function in + /// a loop until the desired number of bytes has been accumulated. + /// Implementations MUST return at least 1 byte when `max-len` is greater + /// than zero. When `max-len` is zero, implementations MUST return an empty + /// list without trapping. #[allow(async_fn_in_trait)] - pub fn get_insecure_random_bytes(len: u64) -> _rt::Vec { + pub fn get_insecure_random_bytes(max_len: u64) -> _rt::Vec { unsafe { #[cfg_attr(target_pointer_width = "64", repr(align(8)))] #[cfg_attr(target_pointer_width = "32", repr(align(4)))] @@ -5085,7 +6662,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:random/insecure@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:random/insecure@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-insecure-random-bytes"] @@ -5095,7 +6672,7 @@ pub mod wasi { unsafe extern "C" fn wit_import1(_: i64, _: *mut u8) { unreachable!() } - wit_import1(_rt::as_i64(&len), ptr0); + wit_import1(_rt::as_i64(&max_len), ptr0); let l2 = *ptr0.add(0).cast::<*mut u8>(); let l3 = *ptr0 .add(::core::mem::size_of::<*const u8>()) @@ -5117,7 +6694,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:random/insecure@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:random/insecure@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-insecure-random-u64"] @@ -5168,7 +6745,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:random/insecure-seed@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:random/insecure-seed@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "get-insecure-seed"] @@ -5200,168 +6777,138 @@ pub mod wasi { /// In theory, every API can return any error code. /// In practice, API's typically only return the errors documented per API /// combined with a couple of errors that are always possible: - /// - `unknown` + /// - `other` /// - `access-denied` /// - `not-supported` /// - `out-of-memory` /// /// See each individual API for what the POSIX equivalents are. They sometimes differ per API. - #[repr(u8)] - #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] + #[derive(Clone)] pub enum ErrorCode { - /// Unknown error - Unknown, /// Access denied. /// /// POSIX equivalent: EACCES, EPERM AccessDenied, /// The operation is not supported. /// - /// POSIX equivalent: EOPNOTSUPP + /// POSIX equivalent: EOPNOTSUPP, ENOPROTOOPT, EPFNOSUPPORT, EPROTONOSUPPORT, ESOCKTNOSUPPORT NotSupported, /// One of the arguments is invalid. /// - /// POSIX equivalent: EINVAL + /// POSIX equivalent: EINVAL, EDESTADDRREQ, EAFNOSUPPORT InvalidArgument, /// Not enough memory to complete the operation. /// - /// POSIX equivalent: ENOMEM, ENOBUFS, EAI_MEMORY + /// POSIX equivalent: ENOMEM, ENOBUFS OutOfMemory, /// The operation timed out before it could finish completely. + /// + /// POSIX equivalent: ETIMEDOUT Timeout, /// The operation is not valid in the socket's current state. InvalidState, - /// A bind operation failed because the provided address is not an address that the `network` can bind to. + /// The local address is not available. + /// + /// POSIX equivalent: EADDRNOTAVAIL AddressNotBindable, - /// A bind operation failed because the provided address is already in use or because there are no ephemeral ports available. + /// A bind operation failed because the provided address is already in + /// use or because there are no ephemeral ports available. + /// + /// POSIX equivalent: EADDRINUSE AddressInUse, - /// The remote address is not reachable + /// The remote address is not reachable. + /// + /// POSIX equivalent: EHOSTUNREACH, EHOSTDOWN, ENETDOWN, ENETUNREACH, ENONET RemoteUnreachable, - /// The TCP connection was forcefully rejected + /// The connection was forcefully rejected. + /// + /// POSIX equivalent: ECONNREFUSED ConnectionRefused, - /// The TCP connection was reset. + /// A write failed because the connection was broken. + /// + /// POSIX equivalent: EPIPE + ConnectionBroken, + /// The connection was reset. + /// + /// POSIX equivalent: ECONNRESET ConnectionReset, - /// A TCP connection was aborted. + /// The connection was aborted. + /// + /// POSIX equivalent: ECONNABORTED ConnectionAborted, /// The size of a datagram sent to a UDP socket exceeded the maximum /// supported size. + /// + /// POSIX equivalent: EMSGSIZE DatagramTooLarge, + /// A catch-all for errors not captured by the existing variants. + /// Implementations can use this to extend the error type without + /// breaking existing code. + Other(Option<_rt::String>), } - impl ErrorCode { - pub fn name(&self) -> &'static str { - match self { - ErrorCode::Unknown => "unknown", - ErrorCode::AccessDenied => "access-denied", - ErrorCode::NotSupported => "not-supported", - ErrorCode::InvalidArgument => "invalid-argument", - ErrorCode::OutOfMemory => "out-of-memory", - ErrorCode::Timeout => "timeout", - ErrorCode::InvalidState => "invalid-state", - ErrorCode::AddressNotBindable => "address-not-bindable", - ErrorCode::AddressInUse => "address-in-use", - ErrorCode::RemoteUnreachable => "remote-unreachable", - ErrorCode::ConnectionRefused => "connection-refused", - ErrorCode::ConnectionReset => "connection-reset", - ErrorCode::ConnectionAborted => "connection-aborted", - ErrorCode::DatagramTooLarge => "datagram-too-large", - } - } - pub fn message(&self) -> &'static str { + impl ::core::fmt::Debug for ErrorCode { + fn fmt( + &self, + f: &mut ::core::fmt::Formatter<'_>, + ) -> ::core::fmt::Result { match self { - ErrorCode::Unknown => "Unknown error", ErrorCode::AccessDenied => { - "Access denied. - - POSIX equivalent: EACCES, EPERM" + f.debug_tuple("ErrorCode::AccessDenied").finish() } ErrorCode::NotSupported => { - "The operation is not supported. - - POSIX equivalent: EOPNOTSUPP" + f.debug_tuple("ErrorCode::NotSupported").finish() } ErrorCode::InvalidArgument => { - "One of the arguments is invalid. - - POSIX equivalent: EINVAL" + f.debug_tuple("ErrorCode::InvalidArgument").finish() } ErrorCode::OutOfMemory => { - "Not enough memory to complete the operation. - - POSIX equivalent: ENOMEM, ENOBUFS, EAI_MEMORY" + f.debug_tuple("ErrorCode::OutOfMemory").finish() } ErrorCode::Timeout => { - "The operation timed out before it could finish completely." + f.debug_tuple("ErrorCode::Timeout").finish() } ErrorCode::InvalidState => { - "The operation is not valid in the socket's current state." + f.debug_tuple("ErrorCode::InvalidState").finish() } ErrorCode::AddressNotBindable => { - "A bind operation failed because the provided address is not an address that the `network` can bind to." + f.debug_tuple("ErrorCode::AddressNotBindable").finish() } ErrorCode::AddressInUse => { - "A bind operation failed because the provided address is already in use or because there are no ephemeral ports available." + f.debug_tuple("ErrorCode::AddressInUse").finish() } ErrorCode::RemoteUnreachable => { - "The remote address is not reachable" + f.debug_tuple("ErrorCode::RemoteUnreachable").finish() } ErrorCode::ConnectionRefused => { - "The TCP connection was forcefully rejected" + f.debug_tuple("ErrorCode::ConnectionRefused").finish() + } + ErrorCode::ConnectionBroken => { + f.debug_tuple("ErrorCode::ConnectionBroken").finish() + } + ErrorCode::ConnectionReset => { + f.debug_tuple("ErrorCode::ConnectionReset").finish() + } + ErrorCode::ConnectionAborted => { + f.debug_tuple("ErrorCode::ConnectionAborted").finish() } - ErrorCode::ConnectionReset => "The TCP connection was reset.", - ErrorCode::ConnectionAborted => "A TCP connection was aborted.", ErrorCode::DatagramTooLarge => { - "The size of a datagram sent to a UDP socket exceeded the maximum - supported size." + f.debug_tuple("ErrorCode::DatagramTooLarge").finish() + } + ErrorCode::Other(e) => { + f.debug_tuple("ErrorCode::Other").field(e).finish() } } } } - impl ::core::fmt::Debug for ErrorCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { - f.debug_struct("ErrorCode") - .field("code", &(*self as i32)) - .field("name", &self.name()) - .field("message", &self.message()) - .finish() - } - } impl ::core::fmt::Display for ErrorCode { fn fmt( &self, f: &mut ::core::fmt::Formatter<'_>, ) -> ::core::fmt::Result { - write!(f, "{} (error {})", self.name(), * self as i32) + write!(f, "{:?}", self) } } impl ::core::error::Error for ErrorCode {} - impl ErrorCode { - #[doc(hidden)] - pub unsafe fn _lift(val: u8) -> ErrorCode { - if !cfg!(debug_assertions) { - return unsafe { ::core::mem::transmute(val) }; - } - match val { - 0 => ErrorCode::Unknown, - 1 => ErrorCode::AccessDenied, - 2 => ErrorCode::NotSupported, - 3 => ErrorCode::InvalidArgument, - 4 => ErrorCode::OutOfMemory, - 5 => ErrorCode::Timeout, - 6 => ErrorCode::InvalidState, - 7 => ErrorCode::AddressNotBindable, - 8 => ErrorCode::AddressInUse, - 9 => ErrorCode::RemoteUnreachable, - 10 => ErrorCode::ConnectionRefused, - 11 => ErrorCode::ConnectionReset, - 12 => ErrorCode::ConnectionAborted, - 13 => ErrorCode::DatagramTooLarge, - _ => panic!("invalid enum discriminant"), - } - } - } #[repr(u8)] #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] pub enum IpAddressFamily { @@ -5493,13 +7040,26 @@ pub mod wasi { /// - `connecting` /// - `connected` /// - `closed` - /// See + /// See /// for more information. /// /// Note: Except where explicitly mentioned, whenever this documentation uses /// the term "bound" without backticks it actually means: in the `bound` state *or higher*. /// (i.e. `bound`, `listening`, `connecting` or `connected`) /// + /// WASI uses shared ownership semantics: the `tcp-socket` handle and all + /// derived `stream` and `future` values reference a single underlying OS + /// socket: + /// - Send/receive streams remain functional after the original `tcp-socket` + /// handle is dropped. + /// - The stream returned by `listen` behaves similarly. + /// - Client sockets returned by `tcp-socket::listen` are independent and do + /// not keep the listening socket alive. + /// + /// The OS socket is closed only after the last handle is dropped. This + /// model has observable effects; for example, it affects when the local + /// port binding is released. + /// /// In addition to the general error codes documented on the /// `types::error-code` type, TCP socket methods may always return /// `error(invalid-state)` when in the `closed` state. @@ -5529,7 +7089,7 @@ pub mod wasi { unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[resource-drop]tcp-socket"] @@ -5571,7 +7131,7 @@ pub mod wasi { unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[resource-drop]udp-socket"] @@ -5590,13 +7150,17 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Create a new TCP socket. /// - /// Similar to `socket(AF_INET or AF_INET6, SOCK_STREAM, IPPROTO_TCP)` in POSIX. - /// On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise. + /// Similar to `socket(AF_INET or AF_INET6, SOCK_STREAM, IPPROTO_TCP)` + /// in POSIX. On IPv6 sockets, IPV6_V6ONLY is enabled by default and + /// can't be configured otherwise. /// /// Unlike POSIX, WASI sockets have no notion of a socket-level /// `O_NONBLOCK` flag. Instead they fully rely on the Component Model's /// async support. /// + /// # Typical errors + /// - `not-supported`: The `address-family` is not supported. (EAFNOSUPPORT) + /// /// # References /// - /// - @@ -5607,15 +7171,21 @@ pub mod wasi { address_family: IpAddressFamily, ) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 8]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]tcp-socket.create"] @@ -5627,24 +7197,77 @@ pub mod wasi { } wit_import1(address_family.clone() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = *ptr0.add(4).cast::(); + let l3 = *ptr0 + .add(::core::mem::size_of::<*const u8>()) + .cast::(); TcpSocket::from_handle(l3 as u32) }; Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -5652,9 +7275,10 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Bind the socket to the provided IP address and port. /// - /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is left to the implementation to decide which - /// network interface(s) to bind to. - /// If the TCP/UDP port is zero, the socket will be bound to a random free port. + /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is + /// left to the implementation to decide which network interface(s) to + /// bind to. If the TCP/UDP port is zero, the socket will be bound to a + /// random free port. /// /// Bind can be attempted multiple times on the same socket, even with /// different arguments on each iteration. But never concurrently and @@ -5671,10 +7295,11 @@ pub mod wasi { /// - `address-not-bindable`: `local-address` is not an address that can be bound to. (EADDRNOTAVAIL) /// /// # Implementors note - /// When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT - /// state of a recently closed socket on the same local address. In practice this means that the SO_REUSEADDR - /// socket option should be set implicitly on all platforms, except on Windows where this is the default behavior - /// and SO_REUSEADDR performs something different entirely. + /// The bind operation shouldn't be affected by the TIME_WAIT state of a + /// recently closed socket on the same local address. In practice this + /// means that the SO_REUSEADDR socket option should be set implicitly + /// on all platforms, except on Windows where this is the default + /// behavior and SO_REUSEADDR performs something different. /// /// # References /// - @@ -5687,10 +7312,16 @@ pub mod wasi { local_address: IpSocketAddress, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ( result4_0, @@ -5751,7 +7382,7 @@ pub mod wasi { let ptr5 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.bind"] @@ -5808,21 +7439,72 @@ pub mod wasi { ptr5, ); let l7 = i32::from(*ptr5.add(0).cast::()); - let result9 = match l7 { + let result14 = match l7 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l8 = i32::from(*ptr5.add(1).cast::()); - ErrorCode::_lift(l8 as u8) + let l8 = i32::from( + *ptr5.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v13 = match l8 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e13 = { + let l9 = i32::from( + *ptr5 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l9 { + 0 => None, + 1 => { + let e = { + let l10 = *ptr5 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l11 = *ptr5 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len12 = l11; + let bytes12 = _rt::Vec::from_raw_parts( + l10.cast(), + len12, + len12, + ); + _rt::string_lift(bytes12) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e13) + } + }; + v13 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result9 + result14 } } } @@ -5830,7 +7512,12 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Connect to a remote endpoint. /// - /// On success, the socket is transitioned into the `connected` state and this function returns a connection resource. + /// On success, the socket is transitioned into the `connected` state + /// and the `remote-address` of the socket is updated. + /// The `local-address` may be updated as well, based on the best network + /// path to `remote-address`. If the socket was not already explicitly + /// bound, this function will implicitly bind the socket to a random + /// free port. /// /// After a failed connection attempt, the socket will be in the `closed` /// state and the only valid action left is to `drop` the socket. A single @@ -5877,11 +7564,14 @@ pub mod wasi { type ParamsLower = ParamsLower; fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { - ::core::alloc::Layout::from_size_align_unchecked(40, 4) + ::core::alloc::Layout::from_size_align_unchecked( + (32 + 6 * ::core::mem::size_of::<*const u8>()), + ::core::mem::size_of::<*const u8>(), + ) } } fn results_offset(&mut self) -> usize { - 36 + (32 + 1 * ::core::mem::size_of::<*const u8>()) } unsafe fn call_import( &mut self, @@ -5890,7 +7580,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]tcp-socket.connect"] @@ -5985,8 +7675,59 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -6083,15 +7824,21 @@ pub mod wasi { ErrorCode, > { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 8]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.listen"] @@ -6103,10 +7850,12 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = *ptr0.add(4).cast::(); + let l3 = *ptr0 + .add(::core::mem::size_of::<*const u8>()) + .cast::(); wit_bindgen::rt::async_support::StreamReader::new( l3 as u32, &::VTABLE, @@ -6116,14 +7865,65 @@ pub mod wasi { } 1 => { let e = { - let l4 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -6141,6 +7941,8 @@ pub mod wasi { /// /// # Typical errors /// - `invalid-state`: The socket is not in the `connected` state. (ENOTCONN) + /// - `invalid-state`: `send` has already been called on this socket. + /// - `connection-broken`: The connection is not writable anymore. (EPIPE, ECONNABORTED on Windows) /// - `connection-reset`: The connection was reset. (ECONNRESET) /// - `remote-unreachable`: The remote address is not reachable. (EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) /// @@ -6159,7 +7961,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.send"] @@ -6187,27 +7989,23 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Read data from peer. /// - /// This function returns a `stream` which provides the data received from the - /// socket, and a `future` providing additional error information in case the - /// socket is closed abnormally. - /// - /// If the socket is closed normally, `stream.read` on the `stream` will return - /// `read-status::closed` with no `error-context` and the future resolves to - /// the value `ok`. If the socket is closed abnormally, `stream.read` on the - /// `stream` returns `read-status::closed` with an `error-context` and the future - /// resolves to `err` with an `error-code`. + /// Returns a `stream` of data sent by the peer. The implementation + /// drops the stream once no more data is available. At that point, the + /// returned `future` resolves to: + /// - `ok` after a graceful shutdown from the peer (i.e. a FIN packet), or + /// - `err` if the socket was closed abnormally. /// - /// `receive` is meant to be called only once per socket. If it is called more - /// than once, the subsequent calls return a new `stream` that fails as if it - /// were closed abnormally. + /// `receive` may be called only once per socket. Subsequent calls return + /// a closed stream and a future resolved to `err(invalid-state)`. /// - /// If the caller is not expecting to receive any data from the peer, - /// they may drop the stream. Any data still in the receive queue + /// If the caller is not expecting to receive any more data from the peer, + /// they should drop the stream. Any data still in the receive queue /// will be discarded. This is equivalent to calling `shutdown(SHUT_RD)` /// in POSIX. /// /// # Typical errors /// - `invalid-state`: The socket is not in the `connected` state. (ENOTCONN) + /// - `invalid-state`: `receive` has already been called on this socket. /// - `connection-reset`: The connection was reset. (ECONNRESET) /// - `remote-unreachable`: The remote address is not reachable. (EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) /// @@ -6232,7 +8030,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.receive"] @@ -6270,7 +8068,8 @@ pub mod wasi { /// > If the socket has not been bound to a local name, the value /// > stored in the object pointed to by `address` is unspecified. /// - /// WASI is stricter and requires `get-local-address` to return `invalid-state` when the socket hasn't been bound yet. + /// WASI is stricter and requires `get-local-address` to return + /// `invalid-state` when the socket hasn't been bound yet. /// /// # Typical errors /// - `invalid-state`: The socket is not bound to any local address. @@ -6283,15 +8082,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_local_address(&self) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 36]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 32 + 1 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 36], + [::core::mem::MaybeUninit::uninit(); 32 + + 1 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-local-address"] @@ -6303,39 +8108,101 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result22 = match l2 { + let result27 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(4).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); let v20 = match l3 { 0 => { let e20 = { - let l4 = i32::from(*ptr0.add(8).cast::()); - let l5 = i32::from(*ptr0.add(10).cast::()); - let l6 = i32::from(*ptr0.add(11).cast::()); - let l7 = i32::from(*ptr0.add(12).cast::()); - let l8 = i32::from(*ptr0.add(13).cast::()); - Ipv4SocketAddress { - port: l4 as u16, - address: (l5 as u8, l6 as u8, l7 as u8, l8 as u8), - } - }; - IpSocketAddress::Ipv4(e20) - } - n => { - debug_assert_eq!(n, 1, "invalid enum discriminant"); + let l4 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l5 = i32::from( + *ptr0 + .add(6 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l6 = i32::from( + *ptr0 + .add(7 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l7 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l8 = i32::from( + *ptr0 + .add(9 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + Ipv4SocketAddress { + port: l4 as u16, + address: (l5 as u8, l6 as u8, l7 as u8, l8 as u8), + } + }; + IpSocketAddress::Ipv4(e20) + } + n => { + debug_assert_eq!(n, 1, "invalid enum discriminant"); let e20 = { - let l9 = i32::from(*ptr0.add(8).cast::()); - let l10 = *ptr0.add(12).cast::(); - let l11 = i32::from(*ptr0.add(16).cast::()); - let l12 = i32::from(*ptr0.add(18).cast::()); - let l13 = i32::from(*ptr0.add(20).cast::()); - let l14 = i32::from(*ptr0.add(22).cast::()); - let l15 = i32::from(*ptr0.add(24).cast::()); - let l16 = i32::from(*ptr0.add(26).cast::()); - let l17 = i32::from(*ptr0.add(28).cast::()); - let l18 = i32::from(*ptr0.add(30).cast::()); - let l19 = *ptr0.add(32).cast::(); + let l9 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l10 = *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l11 = i32::from( + *ptr0 + .add(12 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l12 = i32::from( + *ptr0 + .add(14 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l13 = i32::from( + *ptr0 + .add(16 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l14 = i32::from( + *ptr0 + .add(18 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l15 = i32::from( + *ptr0 + .add(20 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l16 = i32::from( + *ptr0 + .add(22 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l17 = i32::from( + *ptr0 + .add(24 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l18 = i32::from( + *ptr0 + .add(26 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l19 = *ptr0 + .add(28 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); Ipv6SocketAddress { port: l9 as u16, flow_info: l10 as u32, @@ -6361,14 +8228,65 @@ pub mod wasi { } 1 => { let e = { - let l21 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l21 as u8) + let l21 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v26 = match l21 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e26 = { + let l22 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l22 { + 0 => None, + 1 => { + let e = { + let l23 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l24 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len25 = l24; + let bytes25 = _rt::Vec::from_raw_parts( + l23.cast(), + len25, + len25, + ); + _rt::string_lift(bytes25) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e26) + } + }; + v26 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result22 + result27 } } } @@ -6387,15 +8305,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_remote_address(&self) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 36]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 32 + 1 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 36], + [::core::mem::MaybeUninit::uninit(); 32 + + 1 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-remote-address"] @@ -6407,18 +8331,40 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result22 = match l2 { + let result27 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(4).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); let v20 = match l3 { 0 => { let e20 = { - let l4 = i32::from(*ptr0.add(8).cast::()); - let l5 = i32::from(*ptr0.add(10).cast::()); - let l6 = i32::from(*ptr0.add(11).cast::()); - let l7 = i32::from(*ptr0.add(12).cast::()); - let l8 = i32::from(*ptr0.add(13).cast::()); + let l4 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l5 = i32::from( + *ptr0 + .add(6 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l6 = i32::from( + *ptr0 + .add(7 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l7 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l8 = i32::from( + *ptr0 + .add(9 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); Ipv4SocketAddress { port: l4 as u16, address: (l5 as u8, l6 as u8, l7 as u8, l8 as u8), @@ -6429,17 +8375,57 @@ pub mod wasi { n => { debug_assert_eq!(n, 1, "invalid enum discriminant"); let e20 = { - let l9 = i32::from(*ptr0.add(8).cast::()); - let l10 = *ptr0.add(12).cast::(); - let l11 = i32::from(*ptr0.add(16).cast::()); - let l12 = i32::from(*ptr0.add(18).cast::()); - let l13 = i32::from(*ptr0.add(20).cast::()); - let l14 = i32::from(*ptr0.add(22).cast::()); - let l15 = i32::from(*ptr0.add(24).cast::()); - let l16 = i32::from(*ptr0.add(26).cast::()); - let l17 = i32::from(*ptr0.add(28).cast::()); - let l18 = i32::from(*ptr0.add(30).cast::()); - let l19 = *ptr0.add(32).cast::(); + let l9 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l10 = *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l11 = i32::from( + *ptr0 + .add(12 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l12 = i32::from( + *ptr0 + .add(14 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l13 = i32::from( + *ptr0 + .add(16 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l14 = i32::from( + *ptr0 + .add(18 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l15 = i32::from( + *ptr0 + .add(20 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l16 = i32::from( + *ptr0 + .add(22 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l17 = i32::from( + *ptr0 + .add(24 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l18 = i32::from( + *ptr0 + .add(26 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l19 = *ptr0 + .add(28 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); Ipv6SocketAddress { port: l9 as u16, flow_info: l10 as u32, @@ -6465,14 +8451,65 @@ pub mod wasi { } 1 => { let e = { - let l21 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l21 as u8) + let l21 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v26 = match l21 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e26 = { + let l22 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l22 { + 0 => None, + 1 => { + let e = { + let l23 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l24 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len25 = l24; + let bytes25 = _rt::Vec::from_raw_parts( + l23.cast(), + len25, + len25, + ); + _rt::string_lift(bytes25) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e26) + } + }; + v26 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result22 + result27 } } } @@ -6486,7 +8523,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-is-listening"] @@ -6513,7 +8550,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-address-family"] @@ -6530,10 +8567,12 @@ pub mod wasi { } impl TcpSocket { #[allow(unused_unsafe, clippy::all)] - /// Hints the desired listen queue size. Implementations are free to ignore this. + /// Hints the desired listen queue size. Implementations are free to + /// ignore this. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. + /// Any other value will never cause an error, but it might be silently + /// clamped and/or rounded. /// /// # Typical errors /// - `not-supported`: (set) The platform does not support changing the backlog size after the initial listen. @@ -6545,15 +8584,21 @@ pub mod wasi { value: u64, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-listen-backlog-size"] @@ -6565,21 +8610,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -6591,21 +8687,28 @@ pub mod wasi { /// - `keep-alive-idle-time` /// - `keep-alive-interval` /// - `keep-alive-count` - /// These properties can be configured while `keep-alive-enabled` is false, but only come into effect when `keep-alive-enabled` is true. + /// These properties can be configured while `keep-alive-enabled` is + /// false, but only come into effect when `keep-alive-enabled` is true. /// /// Equivalent to the SO_KEEPALIVE socket option. #[allow(async_fn_in_trait)] pub fn get_keep_alive_enabled(&self) -> Result { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-keep-alive-enabled"] @@ -6617,24 +8720,77 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); _rt::bool_lift(l3 as u8) }; Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -6646,15 +8802,21 @@ pub mod wasi { value: bool, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-keep-alive-enabled"] @@ -6673,31 +8835,84 @@ pub mod wasi { ptr0, ); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } impl TcpSocket { #[allow(unused_unsafe, clippy::all)] - /// Amount of time the connection has to be idle before TCP starts sending keepalive packets. + /// Amount of time the connection has to be idle before TCP starts + /// sending keepalive packets. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the TCP_KEEPIDLE socket option. (TCP_KEEPALIVE on MacOS) /// @@ -6707,14 +8922,19 @@ pub mod wasi { pub fn get_keep_alive_idle_time(&self) -> Result { unsafe { #[repr(align(8))] - struct RetArea([::core::mem::MaybeUninit; 16]); + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 8 + 4 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], + [::core::mem::MaybeUninit::uninit(); 8 + + 4 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-keep-alive-idle-time"] @@ -6726,7 +8946,7 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { let l3 = *ptr0.add(8).cast::(); @@ -6737,13 +8957,62 @@ pub mod wasi { 1 => { let e = { let l4 = i32::from(*ptr0.add(8).cast::()); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -6755,15 +9024,21 @@ pub mod wasi { value: Duration, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-keep-alive-idle-time"] @@ -6775,21 +9050,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -6798,8 +9124,9 @@ pub mod wasi { /// The time between keepalive packets. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the TCP_KEEPINTVL socket option. /// @@ -6809,14 +9136,19 @@ pub mod wasi { pub fn get_keep_alive_interval(&self) -> Result { unsafe { #[repr(align(8))] - struct RetArea([::core::mem::MaybeUninit; 16]); + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 8 + 4 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], + [::core::mem::MaybeUninit::uninit(); 8 + + 4 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-keep-alive-interval"] @@ -6828,7 +9160,7 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { let l3 = *ptr0.add(8).cast::(); @@ -6839,13 +9171,62 @@ pub mod wasi { 1 => { let e = { let l4 = i32::from(*ptr0.add(8).cast::()); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -6857,15 +9238,21 @@ pub mod wasi { value: Duration, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-keep-alive-interval"] @@ -6877,31 +9264,84 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } impl TcpSocket { #[allow(unused_unsafe, clippy::all)] - /// The maximum amount of keepalive packets TCP should send before aborting the connection. + /// The maximum amount of keepalive packets TCP should send before + /// aborting the connection. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the TCP_KEEPCNT socket option. /// @@ -6910,15 +9350,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_keep_alive_count(&self) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 8]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-keep-alive-count"] @@ -6930,24 +9376,77 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = *ptr0.add(4).cast::(); + let l3 = *ptr0 + .add(::core::mem::size_of::<*const u8>()) + .cast::(); l3 as u32 }; Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -6956,15 +9455,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn set_keep_alive_count(&self, value: u32) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-keep-alive-count"] @@ -6976,21 +9481,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i32(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -7005,15 +9561,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_hop_limit(&self) -> Result { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-hop-limit"] @@ -7025,24 +9587,77 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); l3 as u8 }; Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -7051,15 +9666,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn set_hop_limit(&self, value: u8) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-hop-limit"] @@ -7071,31 +9692,93 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i32(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } impl TcpSocket { #[allow(unused_unsafe, clippy::all)] - /// The kernel buffer space reserved for sends/receives on this socket. + /// Kernel buffer space reserved for sending/receiving on this socket. + /// Implementations usually treat this as a cap the buffer can grow to, + /// rather than allocating the full amount immediately. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. + /// + /// This is only a performance hint. The implementation may ignore it or + /// tweak it based on real traffic patterns. + /// Linux and macOS appear to behave differently depending on whether a + /// buffer size was explicitly set. When set, they tend to honor it; when + /// not set, they dynamically adjust the buffer size as the connection + /// progresses. This is especially noticeable when comparing the values + /// from before and after connection establishment. /// /// Equivalent to the SO_RCVBUF and SO_SNDBUF socket options. /// @@ -7105,14 +9788,19 @@ pub mod wasi { pub fn get_receive_buffer_size(&self) -> Result { unsafe { #[repr(align(8))] - struct RetArea([::core::mem::MaybeUninit; 16]); + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 8 + 4 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], + [::core::mem::MaybeUninit::uninit(); 8 + + 4 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-receive-buffer-size"] @@ -7124,7 +9812,7 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { let l3 = *ptr0.add(8).cast::(); @@ -7135,13 +9823,62 @@ pub mod wasi { 1 => { let e = { let l4 = i32::from(*ptr0.add(8).cast::()); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -7153,15 +9890,21 @@ pub mod wasi { value: u64, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-receive-buffer-size"] @@ -7173,21 +9916,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -7197,14 +9991,19 @@ pub mod wasi { pub fn get_send_buffer_size(&self) -> Result { unsafe { #[repr(align(8))] - struct RetArea([::core::mem::MaybeUninit; 16]); + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 8 + 4 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], + [::core::mem::MaybeUninit::uninit(); 8 + + 4 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.get-send-buffer-size"] @@ -7216,7 +10015,7 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { let l3 = *ptr0.add(8).cast::(); @@ -7227,13 +10026,62 @@ pub mod wasi { 1 => { let e = { let l4 = i32::from(*ptr0.add(8).cast::()); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -7242,15 +10090,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn set_send_buffer_size(&self, value: u64) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]tcp-socket.set-send-buffer-size"] @@ -7262,21 +10116,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -7284,8 +10189,9 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Create a new UDP socket. /// - /// Similar to `socket(AF_INET or AF_INET6, SOCK_DGRAM, IPPROTO_UDP)` in POSIX. - /// On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise. + /// Similar to `socket(AF_INET or AF_INET6, SOCK_DGRAM, IPPROTO_UDP)` + /// in POSIX. On IPv6 sockets, IPV6_V6ONLY is enabled by default and + /// can't be configured otherwise. /// /// Unlike POSIX, WASI sockets have no notion of a socket-level /// `O_NONBLOCK` flag. Instead they fully rely on the Component Model's @@ -7301,15 +10207,21 @@ pub mod wasi { address_family: IpAddressFamily, ) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 8]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]udp-socket.create"] @@ -7321,24 +10233,77 @@ pub mod wasi { } wit_import1(address_family.clone() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = *ptr0.add(4).cast::(); + let l3 = *ptr0 + .add(::core::mem::size_of::<*const u8>()) + .cast::(); UdpSocket::from_handle(l3 as u32) }; Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -7346,9 +10311,10 @@ pub mod wasi { #[allow(unused_unsafe, clippy::all)] /// Bind the socket to the provided IP address and port. /// - /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is left to the implementation to decide which - /// network interface(s) to bind to. - /// If the port is zero, the socket will be bound to a random free port. + /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is + /// left to the implementation to decide which network interface(s) to + /// bind to. If the port is zero, the socket will be bound to a random + /// free port. /// /// # Typical errors /// - `invalid-argument`: The `local-address` has the wrong address family. (EAFNOSUPPORT, EFAULT on Windows) @@ -7368,10 +10334,16 @@ pub mod wasi { local_address: IpSocketAddress, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ( result4_0, @@ -7432,7 +10404,7 @@ pub mod wasi { let ptr5 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.bind"] @@ -7489,21 +10461,72 @@ pub mod wasi { ptr5, ); let l7 = i32::from(*ptr5.add(0).cast::()); - let result9 = match l7 { + let result14 = match l7 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l8 = i32::from(*ptr5.add(1).cast::()); - ErrorCode::_lift(l8 as u8) + let l8 = i32::from( + *ptr5.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v13 = match l8 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e13 = { + let l9 = i32::from( + *ptr5 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l9 { + 0 => None, + 1 => { + let e = { + let l10 = *ptr5 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l11 = *ptr5 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len12 = l11; + let bytes12 = _rt::Vec::from_raw_parts( + l10.cast(), + len12, + len12, + ); + _rt::string_lift(bytes12) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e13) + } + }; + v13 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result9 + result14 } } } @@ -7551,10 +10574,16 @@ pub mod wasi { remote_address: IpSocketAddress, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ( result4_0, @@ -7615,7 +10644,7 @@ pub mod wasi { let ptr5 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.connect"] @@ -7672,21 +10701,72 @@ pub mod wasi { ptr5, ); let l7 = i32::from(*ptr5.add(0).cast::()); - let result9 = match l7 { + let result14 = match l7 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l8 = i32::from(*ptr5.add(1).cast::()); - ErrorCode::_lift(l8 as u8) + let l8 = i32::from( + *ptr5.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v13 = match l8 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e13 = { + let l9 = i32::from( + *ptr5 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l9 { + 0 => None, + 1 => { + let e = { + let l10 = *ptr5 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l11 = *ptr5 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len12 = l11; + let bytes12 = _rt::Vec::from_raw_parts( + l10.cast(), + len12, + len12, + ); + _rt::string_lift(bytes12) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e13) + } + }; + v13 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result9 + result14 } } } @@ -7695,7 +10775,7 @@ pub mod wasi { /// Dissociate this socket from its peer address. /// /// After calling this method, `send` & `receive` are free to communicate - /// with any address again. + /// with any remote address again. /// /// The POSIX equivalent of this is calling `connect` with an `AF_UNSPEC` address. /// @@ -7710,15 +10790,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn disconnect(&self) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.disconnect"] @@ -7730,21 +10816,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -7760,6 +10897,9 @@ pub mod wasi { /// _may_ be provided but then it must be identical to the address /// passed to `connect`. /// + /// If the socket has not been explicitly bound, it will be + /// implicitly bound to a random free port. + /// /// Implementations may trap if the `data` length exceeds 64 KiB. /// /// # Typical errors @@ -7771,6 +10911,14 @@ pub mod wasi { /// - `remote-unreachable`: The remote address is not reachable. (ECONNRESET, ENETRESET on Windows, EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) /// - `connection-refused`: The connection was refused. (ECONNREFUSED) /// - `datagram-too-large`: The datagram is too large. (EMSGSIZE) + /// - `address-in-use`: Tried to perform an implicit bind, but there were no ephemeral ports available. (EADDRINUSE) + /// + /// # Implementors note + /// WASI requires `send` to perform an implicit bind if the socket + /// has not been bound. Not all platforms (notably Windows) exhibit + /// this behavior natively. On such platforms, the WASI implementation + /// should emulate it by performing the bind if the guest has not + /// already done so. /// /// # References /// - @@ -7807,13 +10955,13 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (40 + 3 * ::core::mem::size_of::<*const u8>()), + (32 + 9 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } } fn results_offset(&mut self) -> usize { - (36 + 3 * ::core::mem::size_of::<*const u8>()) + (32 + 4 * ::core::mem::size_of::<*const u8>()) } unsafe fn call_import( &mut self, @@ -7822,7 +10970,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]udp-socket.send"] @@ -7969,8 +11117,59 @@ pub mod wasi { } 1 => { let e = { - let l1 = i32::from(*_ptr.add(1).cast::()); - ErrorCode::_lift(l1 as u8) + let l1 = i32::from( + *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v6 = match l1 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = _rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + _rt::string_lift(bytes5) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e6) + } + }; + v6 }; Err(e) } @@ -8050,7 +11249,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower][method]udp-socket.receive"] @@ -8224,7 +11423,56 @@ pub mod wasi { let l22 = i32::from( *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), ); - ErrorCode::_lift(l22 as u8) + let v27 = match l22 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e27 = { + let l23 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l23 { + 0 => None, + 1 => { + let e = { + let l24 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l25 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len26 = l25; + let bytes26 = _rt::Vec::from_raw_parts( + l24.cast(), + len26, + len26, + ); + _rt::string_lift(bytes26) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e27) + } + }; + v27 }; Err(e) } @@ -8249,7 +11497,8 @@ pub mod wasi { /// > If the socket has not been bound to a local name, the value /// > stored in the object pointed to by `address` is unspecified. /// - /// WASI is stricter and requires `get-local-address` to return `invalid-state` when the socket hasn't been bound yet. + /// WASI is stricter and requires `get-local-address` to return + /// `invalid-state` when the socket hasn't been bound yet. /// /// # Typical errors /// - `invalid-state`: The socket is not bound to any local address. @@ -8262,15 +11511,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_local_address(&self) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 36]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 32 + 1 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 36], + [::core::mem::MaybeUninit::uninit(); 32 + + 1 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.get-local-address"] @@ -8282,18 +11537,40 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result22 = match l2 { + let result27 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(4).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); let v20 = match l3 { 0 => { let e20 = { - let l4 = i32::from(*ptr0.add(8).cast::()); - let l5 = i32::from(*ptr0.add(10).cast::()); - let l6 = i32::from(*ptr0.add(11).cast::()); - let l7 = i32::from(*ptr0.add(12).cast::()); - let l8 = i32::from(*ptr0.add(13).cast::()); + let l4 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l5 = i32::from( + *ptr0 + .add(6 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l6 = i32::from( + *ptr0 + .add(7 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l7 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l8 = i32::from( + *ptr0 + .add(9 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); Ipv4SocketAddress { port: l4 as u16, address: (l5 as u8, l6 as u8, l7 as u8, l8 as u8), @@ -8304,17 +11581,57 @@ pub mod wasi { n => { debug_assert_eq!(n, 1, "invalid enum discriminant"); let e20 = { - let l9 = i32::from(*ptr0.add(8).cast::()); - let l10 = *ptr0.add(12).cast::(); - let l11 = i32::from(*ptr0.add(16).cast::()); - let l12 = i32::from(*ptr0.add(18).cast::()); - let l13 = i32::from(*ptr0.add(20).cast::()); - let l14 = i32::from(*ptr0.add(22).cast::()); - let l15 = i32::from(*ptr0.add(24).cast::()); - let l16 = i32::from(*ptr0.add(26).cast::()); - let l17 = i32::from(*ptr0.add(28).cast::()); - let l18 = i32::from(*ptr0.add(30).cast::()); - let l19 = *ptr0.add(32).cast::(); + let l9 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l10 = *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l11 = i32::from( + *ptr0 + .add(12 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l12 = i32::from( + *ptr0 + .add(14 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l13 = i32::from( + *ptr0 + .add(16 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l14 = i32::from( + *ptr0 + .add(18 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l15 = i32::from( + *ptr0 + .add(20 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l16 = i32::from( + *ptr0 + .add(22 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l17 = i32::from( + *ptr0 + .add(24 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l18 = i32::from( + *ptr0 + .add(26 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l19 = *ptr0 + .add(28 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); Ipv6SocketAddress { port: l9 as u16, flow_info: l10 as u32, @@ -8340,14 +11657,65 @@ pub mod wasi { } 1 => { let e = { - let l21 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l21 as u8) + let l21 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v26 = match l21 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e26 = { + let l22 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l22 { + 0 => None, + 1 => { + let e = { + let l23 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l24 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len25 = l24; + let bytes25 = _rt::Vec::from_raw_parts( + l23.cast(), + len25, + len25, + ); + _rt::string_lift(bytes25) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e26) + } + }; + v26 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result22 + result27 } } } @@ -8366,15 +11734,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_remote_address(&self) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 36]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 32 + 1 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 36], + [::core::mem::MaybeUninit::uninit(); 32 + + 1 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.get-remote-address"] @@ -8386,18 +11760,40 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result22 = match l2 { + let result27 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(4).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); let v20 = match l3 { 0 => { let e20 = { - let l4 = i32::from(*ptr0.add(8).cast::()); - let l5 = i32::from(*ptr0.add(10).cast::()); - let l6 = i32::from(*ptr0.add(11).cast::()); - let l7 = i32::from(*ptr0.add(12).cast::()); - let l8 = i32::from(*ptr0.add(13).cast::()); + let l4 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l5 = i32::from( + *ptr0 + .add(6 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l6 = i32::from( + *ptr0 + .add(7 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l7 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l8 = i32::from( + *ptr0 + .add(9 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); Ipv4SocketAddress { port: l4 as u16, address: (l5 as u8, l6 as u8, l7 as u8, l8 as u8), @@ -8408,17 +11804,57 @@ pub mod wasi { n => { debug_assert_eq!(n, 1, "invalid enum discriminant"); let e20 = { - let l9 = i32::from(*ptr0.add(8).cast::()); - let l10 = *ptr0.add(12).cast::(); - let l11 = i32::from(*ptr0.add(16).cast::()); - let l12 = i32::from(*ptr0.add(18).cast::()); - let l13 = i32::from(*ptr0.add(20).cast::()); - let l14 = i32::from(*ptr0.add(22).cast::()); - let l15 = i32::from(*ptr0.add(24).cast::()); - let l16 = i32::from(*ptr0.add(26).cast::()); - let l17 = i32::from(*ptr0.add(28).cast::()); - let l18 = i32::from(*ptr0.add(30).cast::()); - let l19 = *ptr0.add(32).cast::(); + let l9 = i32::from( + *ptr0 + .add(4 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l10 = *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let l11 = i32::from( + *ptr0 + .add(12 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l12 = i32::from( + *ptr0 + .add(14 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l13 = i32::from( + *ptr0 + .add(16 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l14 = i32::from( + *ptr0 + .add(18 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l15 = i32::from( + *ptr0 + .add(20 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l16 = i32::from( + *ptr0 + .add(22 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l17 = i32::from( + *ptr0 + .add(24 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l18 = i32::from( + *ptr0 + .add(26 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + let l19 = *ptr0 + .add(28 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(); Ipv6SocketAddress { port: l9 as u16, flow_info: l10 as u32, @@ -8444,14 +11880,65 @@ pub mod wasi { } 1 => { let e = { - let l21 = i32::from(*ptr0.add(4).cast::()); - ErrorCode::_lift(l21 as u8) + let l21 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v26 = match l21 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e26 = { + let l22 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l22 { + 0 => None, + 1 => { + let e = { + let l23 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l24 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len25 = l24; + let bytes25 = _rt::Vec::from_raw_parts( + l23.cast(), + len25, + len25, + ); + _rt::string_lift(bytes25) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e26) + } + }; + v26 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result22 + result27 } } } @@ -8467,7 +11954,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.get-address-family"] @@ -8493,15 +11980,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn get_unicast_hop_limit(&self) -> Result { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.get-unicast-hop-limit"] @@ -8513,24 +12006,77 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); l3 as u8 }; Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l4 as u8) + let l4 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -8539,15 +12085,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn set_unicast_hop_limit(&self, value: u8) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.set-unicast-hop-limit"] @@ -8559,31 +12111,85 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i32(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } impl UdpSocket { #[allow(unused_unsafe, clippy::all)] - /// The kernel buffer space reserved for sends/receives on this socket. + /// Kernel buffer space reserved for sending/receiving on this socket. + /// Implementations usually treat this as a cap the buffer can grow to, + /// rather than allocating the full amount immediately. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the SO_RCVBUF and SO_SNDBUF socket options. /// @@ -8593,14 +12199,19 @@ pub mod wasi { pub fn get_receive_buffer_size(&self) -> Result { unsafe { #[repr(align(8))] - struct RetArea([::core::mem::MaybeUninit; 16]); + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 8 + 4 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], + [::core::mem::MaybeUninit::uninit(); 8 + + 4 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.get-receive-buffer-size"] @@ -8612,7 +12223,7 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { let l3 = *ptr0.add(8).cast::(); @@ -8623,13 +12234,62 @@ pub mod wasi { 1 => { let e = { let l4 = i32::from(*ptr0.add(8).cast::()); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -8641,15 +12301,21 @@ pub mod wasi { value: u64, ) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.set-receive-buffer-size"] @@ -8661,21 +12327,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -8685,14 +12402,19 @@ pub mod wasi { pub fn get_send_buffer_size(&self) -> Result { unsafe { #[repr(align(8))] - struct RetArea([::core::mem::MaybeUninit; 16]); + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 8 + 4 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 16], + [::core::mem::MaybeUninit::uninit(); 8 + + 4 * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.get-send-buffer-size"] @@ -8704,7 +12426,7 @@ pub mod wasi { } wit_import1((self).handle() as i32, ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result5 = match l2 { + let result10 = match l2 { 0 => { let e = { let l3 = *ptr0.add(8).cast::(); @@ -8715,13 +12437,62 @@ pub mod wasi { 1 => { let e = { let l4 = i32::from(*ptr0.add(8).cast::()); - ErrorCode::_lift(l4 as u8) + let v9 = match l4 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr0 + .add(8 + 1 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr0 + .add(8 + 2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr0 + .add(8 + 3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e9) + } + }; + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result5 + result10 } } } @@ -8730,15 +12501,21 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn set_send_buffer_size(&self, value: u64) -> Result<(), ErrorCode> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]udp-socket.set-send-buffer-size"] @@ -8750,21 +12527,72 @@ pub mod wasi { } wit_import1((self).handle() as i32, _rt::as_i64(&value), ptr0); let l2 = i32::from(*ptr0.add(0).cast::()); - let result4 = match l2 { + let result9 = match l2 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l3 = i32::from(*ptr0.add(1).cast::()); - ErrorCode::_lift(l3 as u8) + let l3 = i32::from( + *ptr0.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v8 = match l3 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::NotSupported, + 2 => ErrorCode::InvalidArgument, + 3 => ErrorCode::OutOfMemory, + 4 => ErrorCode::Timeout, + 5 => ErrorCode::InvalidState, + 6 => ErrorCode::AddressNotBindable, + 7 => ErrorCode::AddressInUse, + 8 => ErrorCode::RemoteUnreachable, + 9 => ErrorCode::ConnectionRefused, + 10 => ErrorCode::ConnectionBroken, + 11 => ErrorCode::ConnectionReset, + 12 => ErrorCode::ConnectionAborted, + 13 => ErrorCode::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e8 = { + let l4 = i32::from( + *ptr0 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l4 { + 0 => None, + 1 => { + let e = { + let l5 = *ptr0 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l6 = *ptr0 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len7 = l6; + let bytes7 = _rt::Vec::from_raw_parts( + l5.cast(), + len7, + len7, + ); + _rt::string_lift(bytes7) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e8) + } + }; + v8 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result4 + result9 } } } @@ -8777,11 +12605,8 @@ pub mod wasi { use super::super::super::_rt; pub type IpAddress = super::super::super::wasi::sockets::types::IpAddress; /// Lookup error codes. - #[repr(u8)] - #[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)] + #[derive(Clone)] pub enum ErrorCode { - /// Unknown error - Unknown, /// Access denied. /// /// POSIX equivalent: EACCES, EPERM @@ -8802,97 +12627,53 @@ pub mod wasi { /// /// POSIX equivalent: EAI_FAIL PermanentResolverFailure, + /// A catch-all for errors not captured by the existing variants. + /// Implementations can use this to extend the error type without + /// breaking existing code. + Other(Option<_rt::String>), } - impl ErrorCode { - pub fn name(&self) -> &'static str { - match self { - ErrorCode::Unknown => "unknown", - ErrorCode::AccessDenied => "access-denied", - ErrorCode::InvalidArgument => "invalid-argument", - ErrorCode::NameUnresolvable => "name-unresolvable", - ErrorCode::TemporaryResolverFailure => { - "temporary-resolver-failure" - } - ErrorCode::PermanentResolverFailure => { - "permanent-resolver-failure" - } - } - } - pub fn message(&self) -> &'static str { + impl ::core::fmt::Debug for ErrorCode { + fn fmt( + &self, + f: &mut ::core::fmt::Formatter<'_>, + ) -> ::core::fmt::Result { match self { - ErrorCode::Unknown => "Unknown error", ErrorCode::AccessDenied => { - "Access denied. - - POSIX equivalent: EACCES, EPERM" + f.debug_tuple("ErrorCode::AccessDenied").finish() } ErrorCode::InvalidArgument => { - "`name` is a syntactically invalid domain name or IP address. - - POSIX equivalent: EINVAL" + f.debug_tuple("ErrorCode::InvalidArgument").finish() } ErrorCode::NameUnresolvable => { - "Name does not exist or has no suitable associated IP addresses. - - POSIX equivalent: EAI_NONAME, EAI_NODATA, EAI_ADDRFAMILY" + f.debug_tuple("ErrorCode::NameUnresolvable").finish() } ErrorCode::TemporaryResolverFailure => { - "A temporary failure in name resolution occurred. - - POSIX equivalent: EAI_AGAIN" + f.debug_tuple("ErrorCode::TemporaryResolverFailure").finish() } ErrorCode::PermanentResolverFailure => { - "A permanent failure in name resolution occurred. - - POSIX equivalent: EAI_FAIL" + f.debug_tuple("ErrorCode::PermanentResolverFailure").finish() + } + ErrorCode::Other(e) => { + f.debug_tuple("ErrorCode::Other").field(e).finish() } } } } - impl ::core::fmt::Debug for ErrorCode { - fn fmt( - &self, - f: &mut ::core::fmt::Formatter<'_>, - ) -> ::core::fmt::Result { - f.debug_struct("ErrorCode") - .field("code", &(*self as i32)) - .field("name", &self.name()) - .field("message", &self.message()) - .finish() - } - } impl ::core::fmt::Display for ErrorCode { fn fmt( &self, f: &mut ::core::fmt::Formatter<'_>, ) -> ::core::fmt::Result { - write!(f, "{} (error {})", self.name(), * self as i32) + write!(f, "{:?}", self) } } impl ::core::error::Error for ErrorCode {} - impl ErrorCode { - #[doc(hidden)] - pub unsafe fn _lift(val: u8) -> ErrorCode { - if !cfg!(debug_assertions) { - return unsafe { ::core::mem::transmute(val) }; - } - match val { - 0 => ErrorCode::Unknown, - 1 => ErrorCode::AccessDenied, - 2 => ErrorCode::InvalidArgument, - 3 => ErrorCode::NameUnresolvable, - 4 => ErrorCode::TemporaryResolverFailure, - 5 => ErrorCode::PermanentResolverFailure, - _ => panic!("invalid enum discriminant"), - } - } - } #[allow(unused_unsafe, clippy::all)] /// Resolve an internet host name to a list of IP addresses. /// - /// Unicode domain names are automatically converted to ASCII using IDNA encoding. - /// If the input is an IP address string, the address is parsed and returned - /// as-is without making any external requests. + /// Unicode domain names are automatically converted to ASCII using IDNA + /// encoding. If the input is an IP address string, the address is parsed + /// and returned as-is without making any external requests. /// /// See the wasi-socket proposal README.md for a comparison with getaddrinfo. /// @@ -8902,9 +12683,6 @@ pub mod wasi { /// with at least one address. Additionally, this function never returns /// IPv4-mapped IPv6 addresses. /// - /// The returned future will resolve to an error code in case of failure. - /// It will resolve to success once the returned stream is exhausted. - /// /// # References: /// - /// - @@ -8930,7 +12708,7 @@ pub mod wasi { fn abi_layout(&mut self) -> ::core::alloc::Layout { unsafe { ::core::alloc::Layout::from_size_align_unchecked( - (3 * ::core::mem::size_of::<*const u8>()), + (5 * ::core::mem::size_of::<*const u8>()), ::core::mem::size_of::<*const u8>(), ) } @@ -8945,7 +12723,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:sockets/ip-name-lookup@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower]resolve-addresses"] @@ -9063,7 +12841,47 @@ pub mod wasi { let l18 = i32::from( *_ptr.add(::core::mem::size_of::<*const u8>()).cast::(), ); - ErrorCode::_lift(l18 as u8) + let v23 = match l18 { + 0 => ErrorCode::AccessDenied, + 1 => ErrorCode::InvalidArgument, + 2 => ErrorCode::NameUnresolvable, + 3 => ErrorCode::TemporaryResolverFailure, + 4 => ErrorCode::PermanentResolverFailure, + n => { + debug_assert_eq!(n, 5, "invalid enum discriminant"); + let e23 = { + let l19 = i32::from( + *_ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l19 { + 0 => None, + 1 => { + let e = { + let l20 = *_ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l21 = *_ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len22 = l21; + let bytes22 = _rt::Vec::from_raw_parts( + l20.cast(), + len22, + len22, + ); + _rt::string_lift(bytes22) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + ErrorCode::Other(e23) + } + }; + v23 }; Err(e) } @@ -9318,7 +13136,7 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stdin@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:cli/stdin@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[future-new-1]read-via-stream"] fn new() -> u64; @@ -9429,7 +13247,7 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[future-new-1][method]descriptor.read-via-stream"] fn new() -> u64; @@ -9458,10 +13276,82 @@ pub mod wit_future { } 1 => { let e = { - let l1 = i32::from(*ptr.add(1).cast::()); - super::super::wasi::filesystem::types::ErrorCode::_lift( - l1 as u8, - ) + let l1 = i32::from( + *ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + use super::super::wasi::filesystem::types::ErrorCode as V6; + let v6 = match l1 { + 0 => V6::Access, + 1 => V6::Already, + 2 => V6::BadDescriptor, + 3 => V6::Busy, + 4 => V6::Deadlock, + 5 => V6::Quota, + 6 => V6::Exist, + 7 => V6::FileTooLarge, + 8 => V6::IllegalByteSequence, + 9 => V6::InProgress, + 10 => V6::Interrupted, + 11 => V6::Invalid, + 12 => V6::Io, + 13 => V6::IsDirectory, + 14 => V6::Loop, + 15 => V6::TooManyLinks, + 16 => V6::MessageSize, + 17 => V6::NameTooLong, + 18 => V6::NoDevice, + 19 => V6::NoEntry, + 20 => V6::NoLock, + 21 => V6::InsufficientMemory, + 22 => V6::InsufficientSpace, + 23 => V6::NotDirectory, + 24 => V6::NotEmpty, + 25 => V6::NotRecoverable, + 26 => V6::Unsupported, + 27 => V6::NoTty, + 28 => V6::NoSuchDevice, + 29 => V6::Overflow, + 30 => V6::NotPermitted, + 31 => V6::Pipe, + 32 => V6::ReadOnly, + 33 => V6::InvalidSeek, + 34 => V6::TextFileBusy, + 35 => V6::CrossDevice, + n => { + debug_assert_eq!(n, 36, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = super::super::_rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + super::super::_rt::string_lift(bytes5) + }; + Some(e) + } + _ => super::super::_rt::invalid_enum_discriminant(), + } + }; + V6::Other(e6) + } + }; + v6 }; Err(e) } @@ -9480,13 +13370,289 @@ pub mod wit_future { } Err(e) => { *ptr.add(0).cast::() = (1i32) as u8; - *ptr.add(1).cast::() = (e.clone() as i32) as u8; + use super::super::wasi::filesystem::types::ErrorCode as V1; + match e { + V1::Access => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (0i32) as u8; + } + V1::Already => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (1i32) as u8; + } + V1::BadDescriptor => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (2i32) as u8; + } + V1::Busy => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (3i32) as u8; + } + V1::Deadlock => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (4i32) as u8; + } + V1::Quota => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (5i32) as u8; + } + V1::Exist => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (6i32) as u8; + } + V1::FileTooLarge => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (7i32) as u8; + } + V1::IllegalByteSequence => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (8i32) as u8; + } + V1::InProgress => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (9i32) as u8; + } + V1::Interrupted => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (10i32) as u8; + } + V1::Invalid => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (11i32) as u8; + } + V1::Io => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (12i32) as u8; + } + V1::IsDirectory => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (13i32) as u8; + } + V1::Loop => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (14i32) as u8; + } + V1::TooManyLinks => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (15i32) as u8; + } + V1::MessageSize => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (16i32) as u8; + } + V1::NameTooLong => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (17i32) as u8; + } + V1::NoDevice => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (18i32) as u8; + } + V1::NoEntry => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (19i32) as u8; + } + V1::NoLock => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (20i32) as u8; + } + V1::InsufficientMemory => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (21i32) as u8; + } + V1::InsufficientSpace => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (22i32) as u8; + } + V1::NotDirectory => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (23i32) as u8; + } + V1::NotEmpty => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (24i32) as u8; + } + V1::NotRecoverable => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (25i32) as u8; + } + V1::Unsupported => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (26i32) as u8; + } + V1::NoTty => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (27i32) as u8; + } + V1::NoSuchDevice => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (28i32) as u8; + } + V1::Overflow => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (29i32) as u8; + } + V1::NotPermitted => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (30i32) as u8; + } + V1::Pipe => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (31i32) as u8; + } + V1::ReadOnly => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (32i32) as u8; + } + V1::InvalidSeek => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (33i32) as u8; + } + V1::TextFileBusy => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (34i32) as u8; + } + V1::CrossDevice => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (35i32) as u8; + } + V1::Other(e) => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (36i32) as u8; + match e { + Some(e) => { + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::() = (1i32) as u8; + let vec0 = (e.into_bytes()).into_boxed_slice(); + let ptr0 = vec0.as_ptr().cast::(); + let len0 = vec0.len(); + ::core::mem::forget(vec0); + *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::() = len0; + *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>() = ptr0.cast_mut(); + } + None => { + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::() = (0i32) as u8; + } + }; + } + } } }; } } unsafe fn dealloc_lists(ptr: *mut u8) { - unsafe {} + unsafe { + let l0 = i32::from(*ptr.add(0).cast::()); + match l0 { + 0 => {} + _ => { + let l1 = i32::from( + *ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + match l1 { + 0 => {} + 1 => {} + 2 => {} + 3 => {} + 4 => {} + 5 => {} + 6 => {} + 7 => {} + 8 => {} + 9 => {} + 10 => {} + 11 => {} + 12 => {} + 13 => {} + 14 => {} + 15 => {} + 16 => {} + 17 => {} + 18 => {} + 19 => {} + 20 => {} + 21 => {} + 22 => {} + 23 => {} + 24 => {} + 25 => {} + 26 => {} + 27 => {} + 28 => {} + 29 => {} + 30 => {} + 31 => {} + 32 => {} + 33 => {} + 34 => {} + 35 => {} + _ => { + let l2 = i32::from( + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => {} + _ => { + let l3 = *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + super::super::_rt::cabi_dealloc(l3, l4, 1); + } + } + } + } + } + } + } } pub static VTABLE: wit_bindgen::rt::async_support::FutureVtable< Result<(), super::super::wasi::filesystem::types::ErrorCode>, @@ -9498,7 +13664,7 @@ pub mod wit_future { drop_writable, drop_readable, dealloc_lists, - layout: unsafe { ::std::alloc::Layout::from_size_align_unchecked(2, 1) }, + layout: unsafe { ::std::alloc::Layout::from_size_align_unchecked(20, 4) }, lift, lower, new, @@ -9542,7 +13708,7 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[future-new-1][method]tcp-socket.send"] fn new() -> u64; @@ -9571,10 +13737,60 @@ pub mod wit_future { } 1 => { let e = { - let l1 = i32::from(*ptr.add(1).cast::()); - super::super::wasi::sockets::types::ErrorCode::_lift( - l1 as u8, - ) + let l1 = i32::from( + *ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + use super::super::wasi::sockets::types::ErrorCode as V6; + let v6 = match l1 { + 0 => V6::AccessDenied, + 1 => V6::NotSupported, + 2 => V6::InvalidArgument, + 3 => V6::OutOfMemory, + 4 => V6::Timeout, + 5 => V6::InvalidState, + 6 => V6::AddressNotBindable, + 7 => V6::AddressInUse, + 8 => V6::RemoteUnreachable, + 9 => V6::ConnectionRefused, + 10 => V6::ConnectionBroken, + 11 => V6::ConnectionReset, + 12 => V6::ConnectionAborted, + 13 => V6::DatagramTooLarge, + n => { + debug_assert_eq!(n, 14, "invalid enum discriminant"); + let e6 = { + let l2 = i32::from( + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => None, + 1 => { + let e = { + let l3 = *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len5 = l4; + let bytes5 = super::super::_rt::Vec::from_raw_parts( + l3.cast(), + len5, + len5, + ); + super::super::_rt::string_lift(bytes5) + }; + Some(e) + } + _ => super::super::_rt::invalid_enum_discriminant(), + } + }; + V6::Other(e6) + } + }; + v6 }; Err(e) } @@ -9593,13 +13809,157 @@ pub mod wit_future { } Err(e) => { *ptr.add(0).cast::() = (1i32) as u8; - *ptr.add(1).cast::() = (e.clone() as i32) as u8; + use super::super::wasi::sockets::types::ErrorCode as V1; + match e { + V1::AccessDenied => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (0i32) as u8; + } + V1::NotSupported => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (1i32) as u8; + } + V1::InvalidArgument => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (2i32) as u8; + } + V1::OutOfMemory => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (3i32) as u8; + } + V1::Timeout => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (4i32) as u8; + } + V1::InvalidState => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (5i32) as u8; + } + V1::AddressNotBindable => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (6i32) as u8; + } + V1::AddressInUse => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (7i32) as u8; + } + V1::RemoteUnreachable => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (8i32) as u8; + } + V1::ConnectionRefused => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (9i32) as u8; + } + V1::ConnectionBroken => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (10i32) as u8; + } + V1::ConnectionReset => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (11i32) as u8; + } + V1::ConnectionAborted => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (12i32) as u8; + } + V1::DatagramTooLarge => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (13i32) as u8; + } + V1::Other(e) => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (14i32) as u8; + match e { + Some(e) => { + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::() = (1i32) as u8; + let vec0 = (e.into_bytes()).into_boxed_slice(); + let ptr0 = vec0.as_ptr().cast::(); + let len0 = vec0.len(); + ::core::mem::forget(vec0); + *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::() = len0; + *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>() = ptr0.cast_mut(); + } + None => { + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::() = (0i32) as u8; + } + }; + } + } } }; } } unsafe fn dealloc_lists(ptr: *mut u8) { - unsafe {} + unsafe { + let l0 = i32::from(*ptr.add(0).cast::()); + match l0 { + 0 => {} + _ => { + let l1 = i32::from( + *ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + match l1 { + 0 => {} + 1 => {} + 2 => {} + 3 => {} + 4 => {} + 5 => {} + 6 => {} + 7 => {} + 8 => {} + 9 => {} + 10 => {} + 11 => {} + 12 => {} + 13 => {} + _ => { + let l2 = i32::from( + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l2 { + 0 => {} + _ => { + let l3 = *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l4 = *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + super::super::_rt::cabi_dealloc(l3, l4, 1); + } + } + } + } + } + } + } } pub static VTABLE: wit_bindgen::rt::async_support::FutureVtable< Result<(), super::super::wasi::sockets::types::ErrorCode>, @@ -9611,7 +13971,7 @@ pub mod wit_future { drop_writable, drop_readable, dealloc_lists, - layout: unsafe { ::std::alloc::Layout::from_size_align_unchecked(2, 1) }, + layout: unsafe { ::std::alloc::Layout::from_size_align_unchecked(20, 4) }, lift, lower, new, @@ -9673,7 +14033,7 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stdin@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:cli/stdin@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[stream-new-0]read-via-stream"] fn new() -> u64; @@ -9741,7 +14101,7 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:filesystem/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[stream-new-0][method]descriptor.read-directory"] fn new() -> u64; @@ -9763,21 +14123,62 @@ pub mod wit_stream { ) -> super::super::wasi::filesystem::types::DirectoryEntry { unsafe { let l0 = i32::from(*ptr.add(0).cast::()); - let l1 = *ptr.add(::core::mem::size_of::<*const u8>()).cast::<*mut u8>(); - let l2 = *ptr - .add(2 * ::core::mem::size_of::<*const u8>()) + use super::super::wasi::filesystem::types::DescriptorType as V5; + let v5 = match l0 { + 0 => V5::BlockDevice, + 1 => V5::CharacterDevice, + 2 => V5::Directory, + 3 => V5::Fifo, + 4 => V5::SymbolicLink, + 5 => V5::RegularFile, + 6 => V5::Socket, + n => { + debug_assert_eq!(n, 7, "invalid enum discriminant"); + let e5 = { + let l1 = i32::from( + *ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + match l1 { + 0 => None, + 1 => { + let e = { + let l2 = *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l3 = *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len4 = l3; + let bytes4 = super::super::_rt::Vec::from_raw_parts( + l2.cast(), + len4, + len4, + ); + super::super::_rt::string_lift(bytes4) + }; + Some(e) + } + _ => super::super::_rt::invalid_enum_discriminant(), + } + }; + V5::Other(e5) + } + }; + let l6 = *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr + .add(5 * ::core::mem::size_of::<*const u8>()) .cast::(); - let len3 = l2; - let bytes3 = super::super::_rt::Vec::from_raw_parts( - l1.cast(), - len3, - len3, + let len8 = l7; + let bytes8 = super::super::_rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, ); super::super::wasi::filesystem::types::DirectoryEntry { - type_: super::super::wasi::filesystem::types::DescriptorType::_lift( - l0 as u8, - ), - name: super::super::_rt::string_lift(bytes3), + type_: v5, + name: super::super::_rt::string_lift(bytes8), } } } @@ -9790,23 +14191,100 @@ pub mod wit_stream { type_: type_0, name: name0, } = value; - *ptr.add(0).cast::() = (type_0.clone() as i32) as u8; - let vec1 = (name0.into_bytes()).into_boxed_slice(); - let ptr1 = vec1.as_ptr().cast::(); - let len1 = vec1.len(); - ::core::mem::forget(vec1); - *ptr.add(2 * ::core::mem::size_of::<*const u8>()).cast::() = len1; - *ptr.add(::core::mem::size_of::<*const u8>()).cast::<*mut u8>() = ptr1 + use super::super::wasi::filesystem::types::DescriptorType as V2; + match type_0 { + V2::BlockDevice => { + *ptr.add(0).cast::() = (0i32) as u8; + } + V2::CharacterDevice => { + *ptr.add(0).cast::() = (1i32) as u8; + } + V2::Directory => { + *ptr.add(0).cast::() = (2i32) as u8; + } + V2::Fifo => { + *ptr.add(0).cast::() = (3i32) as u8; + } + V2::SymbolicLink => { + *ptr.add(0).cast::() = (4i32) as u8; + } + V2::RegularFile => { + *ptr.add(0).cast::() = (5i32) as u8; + } + V2::Socket => { + *ptr.add(0).cast::() = (6i32) as u8; + } + V2::Other(e) => { + *ptr.add(0).cast::() = (7i32) as u8; + match e { + Some(e) => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (1i32) as u8; + let vec1 = (e.into_bytes()).into_boxed_slice(); + let ptr1 = vec1.as_ptr().cast::(); + let len1 = vec1.len(); + ::core::mem::forget(vec1); + *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::() = len1; + *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>() = ptr1.cast_mut(); + } + None => { + *ptr + .add(::core::mem::size_of::<*const u8>()) + .cast::() = (0i32) as u8; + } + }; + } + } + let vec3 = (name0.into_bytes()).into_boxed_slice(); + let ptr3 = vec3.as_ptr().cast::(); + let len3 = vec3.len(); + ::core::mem::forget(vec3); + *ptr.add(5 * ::core::mem::size_of::<*const u8>()).cast::() = len3; + *ptr.add(4 * ::core::mem::size_of::<*const u8>()).cast::<*mut u8>() = ptr3 .cast_mut(); } } unsafe fn dealloc_lists(ptr: *mut u8) { unsafe { - let l0 = *ptr.add(::core::mem::size_of::<*const u8>()).cast::<*mut u8>(); - let l1 = *ptr - .add(2 * ::core::mem::size_of::<*const u8>()) + let l0 = i32::from(*ptr.add(0).cast::()); + match l0 { + 0 => {} + 1 => {} + 2 => {} + 3 => {} + 4 => {} + 5 => {} + 6 => {} + _ => { + let l1 = i32::from( + *ptr.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + match l1 { + 0 => {} + _ => { + let l2 = *ptr + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l3 = *ptr + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::(); + super::super::_rt::cabi_dealloc(l2, l3, 1); + } + } + } + } + let l4 = *ptr + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l5 = *ptr + .add(5 * ::core::mem::size_of::<*const u8>()) .cast::(); - super::super::_rt::cabi_dealloc(l0, l1, 1); + super::super::_rt::cabi_dealloc(l4, l5, 1); } } pub static VTABLE: wit_bindgen::rt::async_support::StreamVtable< @@ -9819,7 +14297,7 @@ pub mod wit_stream { drop_writable, drop_readable, dealloc_lists: Some(dealloc_lists), - layout: unsafe { ::std::alloc::Layout::from_size_align_unchecked(12, 4) }, + layout: unsafe { ::std::alloc::Layout::from_size_align_unchecked(24, 4) }, lift: Some(lift), lower: Some(lower), new, @@ -9863,7 +14341,7 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:sockets/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[stream-new-0][method]tcp-socket.listen"] fn new() -> u64; @@ -9929,165 +14407,169 @@ pub mod wit_stream { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe( - link_section = "component-type:wit-bindgen:0.53.0:wasi:cli@0.3.0-rc-2026-02-09:imports:encoded worldrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io" + link_section = "component-type:wit-bindgen:0.54.0:wasi:cli@0.3.0-rc-2026-03-15:imports:encoded worldrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io" )] #[doc(hidden)] #[allow(clippy::octal_escapes)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 7991] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xb9=\x01A\x02\x01A1\x01\ +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 8162] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xe4>\x01A\x02\x01A1\x01\ B\x0a\x01o\x02ss\x01p\0\x01@\0\0\x01\x04\0\x0fget-environment\x01\x02\x01ps\x01@\ \0\0\x03\x04\0\x0dget-arguments\x01\x04\x01ks\x01@\0\0\x05\x04\0\x0fget-initial-\ -cwd\x01\x06\x03\0(wasi:cli/environment@0.3.0-rc-2026-02-09\x05\0\x01B\x03\x01j\0\ +cwd\x01\x06\x03\0(wasi:cli/environment@0.3.0-rc-2026-03-15\x05\0\x01B\x03\x01j\0\ \0\x01@\x01\x06status\0\x01\0\x04\0\x04exit\x01\x01\x03\0!wasi:cli/exit@0.3.0-rc\ --2026-02-09\x05\x01\x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\ -\0\x0aerror-code\x03\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-02-09\x05\x02\x02\x03\ +-2026-03-15\x05\x01\x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\ +\0\x0aerror-code\x03\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-03-15\x05\x02\x02\x03\ \0\x02\x0aerror-code\x01B\x08\x02\x03\x02\x01\x03\x04\0\x0aerror-code\x03\0\0\x01\ f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01o\x02\x02\x04\x01@\0\0\x05\x04\0\x0fread-v\ -ia-stream\x01\x06\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-02-09\x05\x04\x01B\x07\x02\ +ia-stream\x01\x06\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-03-15\x05\x04\x01B\x07\x02\ \x03\x02\x01\x03\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\ \x01@\x01\x04data\x02\0\x04\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/std\ -out@0.3.0-rc-2026-02-09\x05\x05\x01B\x07\x02\x03\x02\x01\x03\x04\0\x0aerror-code\ +out@0.3.0-rc-2026-03-15\x05\x05\x01B\x07\x02\x03\x02\x01\x03\x04\0\x0aerror-code\ \x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01@\x01\x04data\x02\0\x04\x04\0\x10\ -write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-02-09\x05\x06\x01B\x01\ -\x04\0\x0eterminal-input\x03\x01\x03\0+wasi:cli/terminal-input@0.3.0-rc-2026-02-\ -09\x05\x07\x01B\x01\x04\0\x0fterminal-output\x03\x01\x03\0,wasi:cli/terminal-out\ -put@0.3.0-rc-2026-02-09\x05\x08\x02\x03\0\x06\x0eterminal-input\x01B\x06\x02\x03\ +write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-03-15\x05\x06\x01B\x01\ +\x04\0\x0eterminal-input\x03\x01\x03\0+wasi:cli/terminal-input@0.3.0-rc-2026-03-\ +15\x05\x07\x01B\x01\x04\0\x0fterminal-output\x03\x01\x03\0,wasi:cli/terminal-out\ +put@0.3.0-rc-2026-03-15\x05\x08\x02\x03\0\x06\x0eterminal-input\x01B\x06\x02\x03\ \x02\x01\x09\x04\0\x0eterminal-input\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\x04\0\ -\x12get-terminal-stdin\x01\x04\x03\0+wasi:cli/terminal-stdin@0.3.0-rc-2026-02-09\ +\x12get-terminal-stdin\x01\x04\x03\0+wasi:cli/terminal-stdin@0.3.0-rc-2026-03-15\ \x05\x0a\x02\x03\0\x07\x0fterminal-output\x01B\x06\x02\x03\x02\x01\x0b\x04\0\x0f\ terminal-output\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\x04\0\x13get-terminal-std\ -out\x01\x04\x03\0,wasi:cli/terminal-stdout@0.3.0-rc-2026-02-09\x05\x0c\x01B\x06\x02\ +out\x01\x04\x03\0,wasi:cli/terminal-stdout@0.3.0-rc-2026-03-15\x05\x0c\x01B\x06\x02\ \x03\x02\x01\x0b\x04\0\x0fterminal-output\x03\0\0\x01i\x01\x01k\x02\x01@\0\0\x03\ \x04\0\x13get-terminal-stderr\x01\x04\x03\0,wasi:cli/terminal-stderr@0.3.0-rc-20\ -26-02-09\x05\x0d\x01B\x02\x01w\x04\0\x08duration\x03\0\0\x03\0%wasi:clocks/types\ -@0.3.0-rc-2026-02-09\x05\x0e\x02\x03\0\x0b\x08duration\x01B\x0c\x02\x03\x02\x01\x0f\ +26-03-15\x05\x0d\x01B\x02\x01w\x04\0\x08duration\x03\0\0\x03\0%wasi:clocks/types\ +@0.3.0-rc-2026-03-15\x05\x0e\x02\x03\0\x0b\x08duration\x01B\x0c\x02\x03\x02\x01\x0f\ \x04\0\x08duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\0\x03no\ w\x01\x04\x01@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\x01\0\ \x04\0\x0await-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-for\x01\ -\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09\x05\x10\x01B\x08\x02\x03\ +\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15\x05\x10\x01B\x08\x02\x03\ \x02\x01\x0f\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecondsy\x04\0\ \x07instant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0ege\ -t-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-02-09\x05\x11\x02\ -\x03\0\x0d\x07instant\x01BY\x02\x03\x02\x01\x12\x04\0\x07instant\x03\0\0\x01w\x04\ -\0\x08filesize\x03\0\x02\x01m\x08\x07unknown\x0cblock-device\x10character-device\ -\x09directory\x04fifo\x0dsymbolic-link\x0cregular-file\x06socket\x04\0\x0fdescri\ -ptor-type\x03\0\x04\x01n\x06\x04read\x05write\x13file-integrity-sync\x13data-int\ -egrity-sync\x14requested-write-sync\x10mutate-directory\x04\0\x10descriptor-flag\ -s\x03\0\x06\x01n\x01\x0esymlink-follow\x04\0\x0apath-flags\x03\0\x08\x01n\x04\x06\ -create\x09directory\x09exclusive\x08truncate\x04\0\x0aopen-flags\x03\0\x0a\x01w\x04\ -\0\x0alink-count\x03\0\x0c\x01k\x01\x01r\x06\x04type\x05\x0alink-count\x0d\x04si\ -ze\x03\x15data-access-timestamp\x0e\x1bdata-modification-timestamp\x0e\x17status\ --change-timestamp\x0e\x04\0\x0fdescriptor-stat\x03\0\x0f\x01q\x03\x09no-change\0\ -\0\x03now\0\0\x09timestamp\x01\x01\0\x04\0\x0dnew-timestamp\x03\0\x11\x01r\x02\x04\ -type\x05\x04names\x04\0\x0fdirectory-entry\x03\0\x13\x01m$\x06access\x07already\x0e\ -bad-descriptor\x04busy\x08deadlock\x05quota\x05exist\x0efile-too-large\x15illega\ -l-byte-sequence\x0bin-progress\x0binterrupted\x07invalid\x02io\x0cis-directory\x04\ -loop\x0etoo-many-links\x0cmessage-size\x0dname-too-long\x09no-device\x08no-entry\ -\x07no-lock\x13insufficient-memory\x12insufficient-space\x0dnot-directory\x09not\ --empty\x0fnot-recoverable\x0bunsupported\x06no-tty\x0eno-such-device\x08overflow\ -\x0dnot-permitted\x04pipe\x09read-only\x0cinvalid-seek\x0etext-file-busy\x0ccros\ -s-device\x04\0\x0aerror-code\x03\0\x15\x01m\x06\x06normal\x0asequential\x06rando\ -m\x09will-need\x09dont-need\x08no-reuse\x04\0\x06advice\x03\0\x17\x01r\x02\x05lo\ -werw\x05upperw\x04\0\x13metadata-hash-value\x03\0\x19\x04\0\x0adescriptor\x03\x01\ -\x01h\x1b\x01f\x01}\x01j\0\x01\x16\x01e\x01\x1e\x01o\x02\x1d\x1f\x01@\x02\x04sel\ -f\x1c\x06offset\x03\0\x20\x04\0\"[method]descriptor.read-via-stream\x01!\x01@\x03\ -\x04self\x1c\x04data\x1d\x06offset\x03\0\x1f\x04\0#[method]descriptor.write-via-\ -stream\x01\"\x01@\x02\x04self\x1c\x04data\x1d\0\x1f\x04\0$[method]descriptor.app\ -end-via-stream\x01#\x01C\x04\x04self\x1c\x06offset\x03\x06length\x03\x06advice\x18\ -\0\x1e\x04\0\x19[method]descriptor.advise\x01$\x01C\x01\x04self\x1c\0\x1e\x04\0\x1c\ -[method]descriptor.sync-data\x01%\x01j\x01\x07\x01\x16\x01C\x01\x04self\x1c\0&\x04\ -\0\x1c[method]descriptor.get-flags\x01'\x01j\x01\x05\x01\x16\x01C\x01\x04self\x1c\ -\0(\x04\0\x1b[method]descriptor.get-type\x01)\x01C\x02\x04self\x1c\x04size\x03\0\ -\x1e\x04\0\x1b[method]descriptor.set-size\x01*\x01C\x03\x04self\x1c\x15data-acce\ -ss-timestamp\x12\x1bdata-modification-timestamp\x12\0\x1e\x04\0\x1c[method]descr\ -iptor.set-times\x01+\x01f\x01\x14\x01o\x02,\x1f\x01@\x01\x04self\x1c\0-\x04\0![m\ -ethod]descriptor.read-directory\x01.\x04\0\x17[method]descriptor.sync\x01%\x01C\x02\ -\x04self\x1c\x04paths\0\x1e\x04\0&[method]descriptor.create-directory-at\x01/\x01\ -j\x01\x10\x01\x16\x01C\x01\x04self\x1c\00\x04\0\x17[method]descriptor.stat\x011\x01\ -C\x03\x04self\x1c\x0apath-flags\x09\x04paths\00\x04\0\x1a[method]descriptor.stat\ --at\x012\x01C\x05\x04self\x1c\x0apath-flags\x09\x04paths\x15data-access-timestam\ -p\x12\x1bdata-modification-timestamp\x12\0\x1e\x04\0\x1f[method]descriptor.set-t\ -imes-at\x013\x01C\x05\x04self\x1c\x0eold-path-flags\x09\x08old-paths\x0enew-desc\ -riptor\x1c\x08new-paths\0\x1e\x04\0\x1a[method]descriptor.link-at\x014\x01i\x1b\x01\ -j\x015\x01\x16\x01C\x05\x04self\x1c\x0apath-flags\x09\x04paths\x0aopen-flags\x0b\ -\x05flags\x07\06\x04\0\x1a[method]descriptor.open-at\x017\x01j\x01s\x01\x16\x01C\ -\x02\x04self\x1c\x04paths\08\x04\0\x1e[method]descriptor.readlink-at\x019\x04\0&\ -[method]descriptor.remove-directory-at\x01/\x01C\x04\x04self\x1c\x08old-paths\x0e\ -new-descriptor\x1c\x08new-paths\0\x1e\x04\0\x1c[method]descriptor.rename-at\x01:\ -\x01C\x03\x04self\x1c\x08old-paths\x08new-paths\0\x1e\x04\0\x1d[method]descripto\ -r.symlink-at\x01;\x04\0![method]descriptor.unlink-file-at\x01/\x01C\x02\x04self\x1c\ -\x05other\x1c\0\x7f\x04\0![method]descriptor.is-same-object\x01<\x01j\x01\x1a\x01\ -\x16\x01C\x01\x04self\x1c\0=\x04\0\x20[method]descriptor.metadata-hash\x01>\x01C\ -\x03\x04self\x1c\x0apath-flags\x09\x04paths\0=\x04\0#[method]descriptor.metadata\ --hash-at\x01?\x03\0)wasi:filesystem/types@0.3.0-rc-2026-02-09\x05\x13\x02\x03\0\x0e\ -\x0adescriptor\x01B\x07\x02\x03\x02\x01\x14\x04\0\x0adescriptor\x03\0\0\x01i\x01\ -\x01o\x02\x02s\x01p\x03\x01@\0\0\x04\x04\0\x0fget-directories\x01\x05\x03\0,wasi\ -:filesystem/preopens@0.3.0-rc-2026-02-09\x05\x15\x01Bq\x02\x03\x02\x01\x0f\x04\0\ -\x08duration\x03\0\0\x01m\x0e\x07unknown\x0daccess-denied\x0dnot-supported\x10in\ -valid-argument\x0dout-of-memory\x07timeout\x0dinvalid-state\x14address-not-binda\ -ble\x0eaddress-in-use\x12remote-unreachable\x12connection-refused\x10connection-\ -reset\x12connection-aborted\x12datagram-too-large\x04\0\x0aerror-code\x03\0\x02\x01\ -m\x02\x04ipv4\x04ipv6\x04\0\x11ip-address-family\x03\0\x04\x01o\x04}}}}\x04\0\x0c\ -ipv4-address\x03\0\x06\x01o\x08{{{{{{{{\x04\0\x0cipv6-address\x03\0\x08\x01q\x02\ -\x04ipv4\x01\x07\0\x04ipv6\x01\x09\0\x04\0\x0aip-address\x03\0\x0a\x01r\x02\x04p\ -ort{\x07address\x07\x04\0\x13ipv4-socket-address\x03\0\x0c\x01r\x04\x04port{\x09\ -flow-infoy\x07address\x09\x08scope-idy\x04\0\x13ipv6-socket-address\x03\0\x0e\x01\ -q\x02\x04ipv4\x01\x0d\0\x04ipv6\x01\x0f\0\x04\0\x11ip-socket-address\x03\0\x10\x04\ -\0\x0atcp-socket\x03\x01\x04\0\x0audp-socket\x03\x01\x01i\x12\x01j\x01\x14\x01\x03\ -\x01@\x01\x0eaddress-family\x05\0\x15\x04\0\x19[static]tcp-socket.create\x01\x16\ -\x01h\x12\x01j\0\x01\x03\x01@\x02\x04self\x17\x0dlocal-address\x11\0\x18\x04\0\x17\ -[method]tcp-socket.bind\x01\x19\x01C\x02\x04self\x17\x0eremote-address\x11\0\x18\ -\x04\0\x1a[method]tcp-socket.connect\x01\x1a\x01f\x01\x14\x01j\x01\x1b\x01\x03\x01\ -@\x01\x04self\x17\0\x1c\x04\0\x19[method]tcp-socket.listen\x01\x1d\x01f\x01}\x01\ -e\x01\x18\x01@\x02\x04self\x17\x04data\x1e\0\x1f\x04\0\x17[method]tcp-socket.sen\ -d\x01\x20\x01o\x02\x1e\x1f\x01@\x01\x04self\x17\0!\x04\0\x1a[method]tcp-socket.r\ -eceive\x01\"\x01j\x01\x11\x01\x03\x01@\x01\x04self\x17\0#\x04\0$[method]tcp-sock\ -et.get-local-address\x01$\x04\0%[method]tcp-socket.get-remote-address\x01$\x01@\x01\ -\x04self\x17\0\x7f\x04\0#[method]tcp-socket.get-is-listening\x01%\x01@\x01\x04se\ -lf\x17\0\x05\x04\0%[method]tcp-socket.get-address-family\x01&\x01@\x02\x04self\x17\ -\x05valuew\0\x18\x04\0*[method]tcp-socket.set-listen-backlog-size\x01'\x01j\x01\x7f\ -\x01\x03\x01@\x01\x04self\x17\0(\x04\0)[method]tcp-socket.get-keep-alive-enabled\ -\x01)\x01@\x02\x04self\x17\x05value\x7f\0\x18\x04\0)[method]tcp-socket.set-keep-\ -alive-enabled\x01*\x01j\x01\x01\x01\x03\x01@\x01\x04self\x17\0+\x04\0+[method]tc\ -p-socket.get-keep-alive-idle-time\x01,\x01@\x02\x04self\x17\x05value\x01\0\x18\x04\ -\0+[method]tcp-socket.set-keep-alive-idle-time\x01-\x04\0*[method]tcp-socket.get\ --keep-alive-interval\x01,\x04\0*[method]tcp-socket.set-keep-alive-interval\x01-\x01\ -j\x01y\x01\x03\x01@\x01\x04self\x17\0.\x04\0'[method]tcp-socket.get-keep-alive-c\ -ount\x01/\x01@\x02\x04self\x17\x05valuey\0\x18\x04\0'[method]tcp-socket.set-keep\ --alive-count\x010\x01j\x01}\x01\x03\x01@\x01\x04self\x17\01\x04\0\x20[method]tcp\ --socket.get-hop-limit\x012\x01@\x02\x04self\x17\x05value}\0\x18\x04\0\x20[method\ -]tcp-socket.set-hop-limit\x013\x01j\x01w\x01\x03\x01@\x01\x04self\x17\04\x04\0*[\ -method]tcp-socket.get-receive-buffer-size\x015\x04\0*[method]tcp-socket.set-rece\ -ive-buffer-size\x01'\x04\0'[method]tcp-socket.get-send-buffer-size\x015\x04\0'[m\ -ethod]tcp-socket.set-send-buffer-size\x01'\x01i\x13\x01j\x016\x01\x03\x01@\x01\x0e\ -address-family\x05\07\x04\0\x19[static]udp-socket.create\x018\x01h\x13\x01@\x02\x04\ -self9\x0dlocal-address\x11\0\x18\x04\0\x17[method]udp-socket.bind\x01:\x01@\x02\x04\ -self9\x0eremote-address\x11\0\x18\x04\0\x1a[method]udp-socket.connect\x01;\x01@\x01\ -\x04self9\0\x18\x04\0\x1d[method]udp-socket.disconnect\x01<\x01p}\x01k\x11\x01C\x03\ -\x04self9\x04data=\x0eremote-address>\0\x18\x04\0\x17[method]udp-socket.send\x01\ -?\x01o\x02=\x11\x01j\x01\xc0\0\x01\x03\x01C\x01\x04self9\0\xc1\0\x04\0\x1a[metho\ -d]udp-socket.receive\x01B\x01@\x01\x04self9\0#\x04\0$[method]udp-socket.get-loca\ -l-address\x01C\x04\0%[method]udp-socket.get-remote-address\x01C\x01@\x01\x04self\ -9\0\x05\x04\0%[method]udp-socket.get-address-family\x01D\x01@\x01\x04self9\01\x04\ -\0([method]udp-socket.get-unicast-hop-limit\x01E\x01@\x02\x04self9\x05value}\0\x18\ -\x04\0([method]udp-socket.set-unicast-hop-limit\x01F\x01@\x01\x04self9\04\x04\0*\ -[method]udp-socket.get-receive-buffer-size\x01G\x01@\x02\x04self9\x05valuew\0\x18\ -\x04\0*[method]udp-socket.set-receive-buffer-size\x01H\x04\0'[method]udp-socket.\ -get-send-buffer-size\x01G\x04\0'[method]udp-socket.set-send-buffer-size\x01H\x03\ -\0&wasi:sockets/types@0.3.0-rc-2026-02-09\x05\x16\x02\x03\0\x10\x0aip-address\x01\ -B\x08\x02\x03\x02\x01\x17\x04\0\x0aip-address\x03\0\0\x01m\x06\x07unknown\x0dacc\ -ess-denied\x10invalid-argument\x11name-unresolvable\x1atemporary-resolver-failur\ -e\x1apermanent-resolver-failure\x04\0\x0aerror-code\x03\0\x02\x01p\x01\x01j\x01\x04\ -\x01\x03\x01C\x01\x04names\0\x05\x04\0\x11resolve-addresses\x01\x06\x03\0/wasi:s\ -ockets/ip-name-lookup@0.3.0-rc-2026-02-09\x05\x18\x01B\x05\x01p}\x01@\x01\x03len\ -w\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget-random-u64\x01\x02\ -\x03\0&wasi:random/random@0.3.0-rc-2026-02-09\x05\x19\x01B\x05\x01p}\x01@\x01\x03\ -lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01@\0\0w\x04\0\x17get-insec\ -ure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0-rc-2026-02-09\x05\x1a\x01\ -B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\x03\0-wasi:random\ -/insecure-seed@0.3.0-rc-2026-02-09\x05\x1b\x04\0$wasi:cli/imports@0.3.0-rc-2026-\ -02-09\x04\0\x0b\x0d\x01\0\x07imports\x03\0\0\0G\x09producers\x01\x0cprocessed-by\ -\x02\x0dwit-component\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +t-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-03-15\x05\x11\x02\ +\x03\0\x0d\x07instant\x01BZ\x02\x03\x02\x01\x12\x04\0\x07instant\x03\0\0\x01w\x04\ +\0\x08filesize\x03\0\x02\x01ks\x01q\x08\x0cblock-device\0\0\x10character-device\0\ +\0\x09directory\0\0\x04fifo\0\0\x0dsymbolic-link\0\0\x0cregular-file\0\0\x06sock\ +et\0\0\x05other\x01\x04\0\x04\0\x0fdescriptor-type\x03\0\x05\x01n\x06\x04read\x05\ +write\x13file-integrity-sync\x13data-integrity-sync\x14requested-write-sync\x10m\ +utate-directory\x04\0\x10descriptor-flags\x03\0\x07\x01n\x01\x0esymlink-follow\x04\ +\0\x0apath-flags\x03\0\x09\x01n\x04\x06create\x09directory\x09exclusive\x08trunc\ +ate\x04\0\x0aopen-flags\x03\0\x0b\x01w\x04\0\x0alink-count\x03\0\x0d\x01k\x01\x01\ +r\x06\x04type\x06\x0alink-count\x0e\x04size\x03\x15data-access-timestamp\x0f\x1b\ +data-modification-timestamp\x0f\x17status-change-timestamp\x0f\x04\0\x0fdescript\ +or-stat\x03\0\x10\x01q\x03\x09no-change\0\0\x03now\0\0\x09timestamp\x01\x01\0\x04\ +\0\x0dnew-timestamp\x03\0\x12\x01r\x02\x04type\x06\x04names\x04\0\x0fdirectory-e\ +ntry\x03\0\x14\x01q%\x06access\0\0\x07already\0\0\x0ebad-descriptor\0\0\x04busy\0\ +\0\x08deadlock\0\0\x05quota\0\0\x05exist\0\0\x0efile-too-large\0\0\x15illegal-by\ +te-sequence\0\0\x0bin-progress\0\0\x0binterrupted\0\0\x07invalid\0\0\x02io\0\0\x0c\ +is-directory\0\0\x04loop\0\0\x0etoo-many-links\0\0\x0cmessage-size\0\0\x0dname-t\ +oo-long\0\0\x09no-device\0\0\x08no-entry\0\0\x07no-lock\0\0\x13insufficient-memo\ +ry\0\0\x12insufficient-space\0\0\x0dnot-directory\0\0\x09not-empty\0\0\x0fnot-re\ +coverable\0\0\x0bunsupported\0\0\x06no-tty\0\0\x0eno-such-device\0\0\x08overflow\ +\0\0\x0dnot-permitted\0\0\x04pipe\0\0\x09read-only\0\0\x0cinvalid-seek\0\0\x0ete\ +xt-file-busy\0\0\x0ccross-device\0\0\x05other\x01\x04\0\x04\0\x0aerror-code\x03\0\ +\x16\x01m\x06\x06normal\x0asequential\x06random\x09will-need\x09dont-need\x08no-\ +reuse\x04\0\x06advice\x03\0\x18\x01r\x02\x05lowerw\x05upperw\x04\0\x13metadata-h\ +ash-value\x03\0\x1a\x04\0\x0adescriptor\x03\x01\x01h\x1c\x01f\x01}\x01j\0\x01\x17\ +\x01e\x01\x1f\x01o\x02\x1e\x20\x01@\x02\x04self\x1d\x06offset\x03\0!\x04\0\"[met\ +hod]descriptor.read-via-stream\x01\"\x01@\x03\x04self\x1d\x04data\x1e\x06offset\x03\ +\0\x20\x04\0#[method]descriptor.write-via-stream\x01#\x01@\x02\x04self\x1d\x04da\ +ta\x1e\0\x20\x04\0$[method]descriptor.append-via-stream\x01$\x01C\x04\x04self\x1d\ +\x06offset\x03\x06length\x03\x06advice\x19\0\x1f\x04\0\x19[method]descriptor.adv\ +ise\x01%\x01C\x01\x04self\x1d\0\x1f\x04\0\x1c[method]descriptor.sync-data\x01&\x01\ +j\x01\x08\x01\x17\x01C\x01\x04self\x1d\0'\x04\0\x1c[method]descriptor.get-flags\x01\ +(\x01j\x01\x06\x01\x17\x01C\x01\x04self\x1d\0)\x04\0\x1b[method]descriptor.get-t\ +ype\x01*\x01C\x02\x04self\x1d\x04size\x03\0\x1f\x04\0\x1b[method]descriptor.set-\ +size\x01+\x01C\x03\x04self\x1d\x15data-access-timestamp\x13\x1bdata-modification\ +-timestamp\x13\0\x1f\x04\0\x1c[method]descriptor.set-times\x01,\x01f\x01\x15\x01\ +o\x02-\x20\x01@\x01\x04self\x1d\0.\x04\0![method]descriptor.read-directory\x01/\x04\ +\0\x17[method]descriptor.sync\x01&\x01C\x02\x04self\x1d\x04paths\0\x1f\x04\0&[me\ +thod]descriptor.create-directory-at\x010\x01j\x01\x11\x01\x17\x01C\x01\x04self\x1d\ +\01\x04\0\x17[method]descriptor.stat\x012\x01C\x03\x04self\x1d\x0apath-flags\x0a\ +\x04paths\01\x04\0\x1a[method]descriptor.stat-at\x013\x01C\x05\x04self\x1d\x0apa\ +th-flags\x0a\x04paths\x15data-access-timestamp\x13\x1bdata-modification-timestam\ +p\x13\0\x1f\x04\0\x1f[method]descriptor.set-times-at\x014\x01C\x05\x04self\x1d\x0e\ +old-path-flags\x0a\x08old-paths\x0enew-descriptor\x1d\x08new-paths\0\x1f\x04\0\x1a\ +[method]descriptor.link-at\x015\x01i\x1c\x01j\x016\x01\x17\x01C\x05\x04self\x1d\x0a\ +path-flags\x0a\x04paths\x0aopen-flags\x0c\x05flags\x08\07\x04\0\x1a[method]descr\ +iptor.open-at\x018\x01j\x01s\x01\x17\x01C\x02\x04self\x1d\x04paths\09\x04\0\x1e[\ +method]descriptor.readlink-at\x01:\x04\0&[method]descriptor.remove-directory-at\x01\ +0\x01C\x04\x04self\x1d\x08old-paths\x0enew-descriptor\x1d\x08new-paths\0\x1f\x04\ +\0\x1c[method]descriptor.rename-at\x01;\x01C\x03\x04self\x1d\x08old-paths\x08new\ +-paths\0\x1f\x04\0\x1d[method]descriptor.symlink-at\x01<\x04\0![method]descripto\ +r.unlink-file-at\x010\x01C\x02\x04self\x1d\x05other\x1d\0\x7f\x04\0![method]desc\ +riptor.is-same-object\x01=\x01j\x01\x1b\x01\x17\x01C\x01\x04self\x1d\0>\x04\0\x20\ +[method]descriptor.metadata-hash\x01?\x01C\x03\x04self\x1d\x0apath-flags\x0a\x04\ +paths\0>\x04\0#[method]descriptor.metadata-hash-at\x01@\x03\0)wasi:filesystem/ty\ +pes@0.3.0-rc-2026-03-15\x05\x13\x02\x03\0\x0e\x0adescriptor\x01B\x07\x02\x03\x02\ +\x01\x14\x04\0\x0adescriptor\x03\0\0\x01i\x01\x01o\x02\x02s\x01p\x03\x01@\0\0\x04\ +\x04\0\x0fget-directories\x01\x05\x03\0,wasi:filesystem/preopens@0.3.0-rc-2026-0\ +3-15\x05\x15\x01Br\x02\x03\x02\x01\x0f\x04\0\x08duration\x03\0\0\x01ks\x01q\x0f\x0d\ +access-denied\0\0\x0dnot-supported\0\0\x10invalid-argument\0\0\x0dout-of-memory\0\ +\0\x07timeout\0\0\x0dinvalid-state\0\0\x14address-not-bindable\0\0\x0eaddress-in\ +-use\0\0\x12remote-unreachable\0\0\x12connection-refused\0\0\x11connection-broke\ +n\0\0\x10connection-reset\0\0\x12connection-aborted\0\0\x12datagram-too-large\0\0\ +\x05other\x01\x02\0\x04\0\x0aerror-code\x03\0\x03\x01m\x02\x04ipv4\x04ipv6\x04\0\ +\x11ip-address-family\x03\0\x05\x01o\x04}}}}\x04\0\x0cipv4-address\x03\0\x07\x01\ +o\x08{{{{{{{{\x04\0\x0cipv6-address\x03\0\x09\x01q\x02\x04ipv4\x01\x08\0\x04ipv6\ +\x01\x0a\0\x04\0\x0aip-address\x03\0\x0b\x01r\x02\x04port{\x07address\x08\x04\0\x13\ +ipv4-socket-address\x03\0\x0d\x01r\x04\x04port{\x09flow-infoy\x07address\x0a\x08\ +scope-idy\x04\0\x13ipv6-socket-address\x03\0\x0f\x01q\x02\x04ipv4\x01\x0e\0\x04i\ +pv6\x01\x10\0\x04\0\x11ip-socket-address\x03\0\x11\x04\0\x0atcp-socket\x03\x01\x04\ +\0\x0audp-socket\x03\x01\x01i\x13\x01j\x01\x15\x01\x04\x01@\x01\x0eaddress-famil\ +y\x06\0\x16\x04\0\x19[static]tcp-socket.create\x01\x17\x01h\x13\x01j\0\x01\x04\x01\ +@\x02\x04self\x18\x0dlocal-address\x12\0\x19\x04\0\x17[method]tcp-socket.bind\x01\ +\x1a\x01C\x02\x04self\x18\x0eremote-address\x12\0\x19\x04\0\x1a[method]tcp-socke\ +t.connect\x01\x1b\x01f\x01\x15\x01j\x01\x1c\x01\x04\x01@\x01\x04self\x18\0\x1d\x04\ +\0\x19[method]tcp-socket.listen\x01\x1e\x01f\x01}\x01e\x01\x19\x01@\x02\x04self\x18\ +\x04data\x1f\0\x20\x04\0\x17[method]tcp-socket.send\x01!\x01o\x02\x1f\x20\x01@\x01\ +\x04self\x18\0\"\x04\0\x1a[method]tcp-socket.receive\x01#\x01j\x01\x12\x01\x04\x01\ +@\x01\x04self\x18\0$\x04\0$[method]tcp-socket.get-local-address\x01%\x04\0%[meth\ +od]tcp-socket.get-remote-address\x01%\x01@\x01\x04self\x18\0\x7f\x04\0#[method]t\ +cp-socket.get-is-listening\x01&\x01@\x01\x04self\x18\0\x06\x04\0%[method]tcp-soc\ +ket.get-address-family\x01'\x01@\x02\x04self\x18\x05valuew\0\x19\x04\0*[method]t\ +cp-socket.set-listen-backlog-size\x01(\x01j\x01\x7f\x01\x04\x01@\x01\x04self\x18\ +\0)\x04\0)[method]tcp-socket.get-keep-alive-enabled\x01*\x01@\x02\x04self\x18\x05\ +value\x7f\0\x19\x04\0)[method]tcp-socket.set-keep-alive-enabled\x01+\x01j\x01\x01\ +\x01\x04\x01@\x01\x04self\x18\0,\x04\0+[method]tcp-socket.get-keep-alive-idle-ti\ +me\x01-\x01@\x02\x04self\x18\x05value\x01\0\x19\x04\0+[method]tcp-socket.set-kee\ +p-alive-idle-time\x01.\x04\0*[method]tcp-socket.get-keep-alive-interval\x01-\x04\ +\0*[method]tcp-socket.set-keep-alive-interval\x01.\x01j\x01y\x01\x04\x01@\x01\x04\ +self\x18\0/\x04\0'[method]tcp-socket.get-keep-alive-count\x010\x01@\x02\x04self\x18\ +\x05valuey\0\x19\x04\0'[method]tcp-socket.set-keep-alive-count\x011\x01j\x01}\x01\ +\x04\x01@\x01\x04self\x18\02\x04\0\x20[method]tcp-socket.get-hop-limit\x013\x01@\ +\x02\x04self\x18\x05value}\0\x19\x04\0\x20[method]tcp-socket.set-hop-limit\x014\x01\ +j\x01w\x01\x04\x01@\x01\x04self\x18\05\x04\0*[method]tcp-socket.get-receive-buff\ +er-size\x016\x04\0*[method]tcp-socket.set-receive-buffer-size\x01(\x04\0'[method\ +]tcp-socket.get-send-buffer-size\x016\x04\0'[method]tcp-socket.set-send-buffer-s\ +ize\x01(\x01i\x14\x01j\x017\x01\x04\x01@\x01\x0eaddress-family\x06\08\x04\0\x19[\ +static]udp-socket.create\x019\x01h\x14\x01@\x02\x04self:\x0dlocal-address\x12\0\x19\ +\x04\0\x17[method]udp-socket.bind\x01;\x01@\x02\x04self:\x0eremote-address\x12\0\ +\x19\x04\0\x1a[method]udp-socket.connect\x01<\x01@\x01\x04self:\0\x19\x04\0\x1d[\ +method]udp-socket.disconnect\x01=\x01p}\x01k\x12\x01C\x03\x04self:\x04data>\x0er\ +emote-address?\0\x19\x04\0\x17[method]udp-socket.send\x01@\x01o\x02>\x12\x01j\x01\ +\xc1\0\x01\x04\x01C\x01\x04self:\0\xc2\0\x04\0\x1a[method]udp-socket.receive\x01\ +C\x01@\x01\x04self:\0$\x04\0$[method]udp-socket.get-local-address\x01D\x04\0%[me\ +thod]udp-socket.get-remote-address\x01D\x01@\x01\x04self:\0\x06\x04\0%[method]ud\ +p-socket.get-address-family\x01E\x01@\x01\x04self:\02\x04\0([method]udp-socket.g\ +et-unicast-hop-limit\x01F\x01@\x02\x04self:\x05value}\0\x19\x04\0([method]udp-so\ +cket.set-unicast-hop-limit\x01G\x01@\x01\x04self:\05\x04\0*[method]udp-socket.ge\ +t-receive-buffer-size\x01H\x01@\x02\x04self:\x05valuew\0\x19\x04\0*[method]udp-s\ +ocket.set-receive-buffer-size\x01I\x04\0'[method]udp-socket.get-send-buffer-size\ +\x01H\x04\0'[method]udp-socket.set-send-buffer-size\x01I\x03\0&wasi:sockets/type\ +s@0.3.0-rc-2026-03-15\x05\x16\x02\x03\0\x10\x0aip-address\x01B\x09\x02\x03\x02\x01\ +\x17\x04\0\x0aip-address\x03\0\0\x01ks\x01q\x06\x0daccess-denied\0\0\x10invalid-\ +argument\0\0\x11name-unresolvable\0\0\x1atemporary-resolver-failure\0\0\x1aperma\ +nent-resolver-failure\0\0\x05other\x01\x02\0\x04\0\x0aerror-code\x03\0\x03\x01p\x01\ +\x01j\x01\x05\x01\x04\x01C\x01\x04names\0\x06\x04\0\x11resolve-addresses\x01\x07\ +\x03\0/wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15\x05\x18\x01B\x05\x01p}\x01\ +@\x01\x07max-lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\x0eget-r\ +andom-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-03-15\x05\x19\x01B\x05\x01\ +p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01@\0\0w\ +\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0-rc-20\ +26-03-15\x05\x1a\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\ +\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-03-15\x05\x1b\x04\0$wasi:cli/impo\ +rts@0.3.0-rc-2026-03-15\x04\0\x0b\x0d\x01\0\x07imports\x03\0\0\0G\x09producers\x01\ +\x0cprocessed-by\x02\x0dwit-component\x070.245.1\x10wit-bindgen-rust\x060.54.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { diff --git a/crates/wasip3/src/service.rs b/crates/wasip3/src/service.rs index 014163c..1971421 100644 --- a/crates/wasip3/src/service.rs +++ b/crates/wasip3/src/service.rs @@ -1,16 +1,16 @@ -// Generated by `wit-bindgen` 0.53.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.54.0. DO NOT EDIT! // Options used: -// * with "wasi:cli/stdin@0.3.0-rc-2026-02-09" = "crate::cli::stdin" -// * with "wasi:cli/stdout@0.3.0-rc-2026-02-09" = "crate::cli::stdout" -// * with "wasi:cli/stderr@0.3.0-rc-2026-02-09" = "crate::cli::stderr" -// * with "wasi:cli/types@0.3.0-rc-2026-02-09" = "crate::cli::types" -// * with "wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09" = "crate::clocks::monotonic_clock" -// * with "wasi:clocks/system-clock@0.3.0-rc-2026-02-09" = "crate::clocks::system_clock" -// * with "wasi:clocks/types@0.3.0-rc-2026-02-09" = "crate::clocks::types" -// * with "wasi:random/random@0.3.0-rc-2026-02-09" = "crate::random::random" -// * with "wasi:random/insecure@0.3.0-rc-2026-02-09" = "crate::random::insecure" -// * with "wasi:random/insecure-seed@0.3.0-rc-2026-02-09" = "crate::random::insecure_seed" -// * type_section_suffix: "rust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io-service-world" +// * with "wasi:cli/stdin@0.3.0-rc-2026-03-15" = "crate::cli::stdin" +// * with "wasi:cli/stdout@0.3.0-rc-2026-03-15" = "crate::cli::stdout" +// * with "wasi:cli/stderr@0.3.0-rc-2026-03-15" = "crate::cli::stderr" +// * with "wasi:cli/types@0.3.0-rc-2026-03-15" = "crate::cli::types" +// * with "wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15" = "crate::clocks::monotonic_clock" +// * with "wasi:clocks/system-clock@0.3.0-rc-2026-03-15" = "crate::clocks::system_clock" +// * with "wasi:clocks/types@0.3.0-rc-2026-03-15" = "crate::clocks::types" +// * with "wasi:random/random@0.3.0-rc-2026-03-15" = "crate::random::random" +// * with "wasi:random/insecure@0.3.0-rc-2026-03-15" = "crate::random::insecure" +// * with "wasi:random/insecure-seed@0.3.0-rc-2026-03-15" = "crate::random::insecure_seed" +// * type_section_suffix: "rust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io-service-world" // * default-bindings-module: "$crate" // * export-macro-name: _export_service // * pub-export-macro @@ -367,7 +367,7 @@ pub mod wasi { impl ::core::error::Error for ErrorCode {} /// This type enumerates the different kinds of errors that may occur when /// setting or appending to a `fields` resource. - #[derive(Clone, Copy)] + #[derive(Clone)] pub enum HeaderError { /// This error indicates that a `field-name` or `field-value` was /// syntactically invalid when used with an operation that sets headers in a @@ -379,6 +379,18 @@ pub mod wasi { /// This error indicates that the operation on the `fields` was not /// permitted because the fields are immutable. Immutable, + /// This error indicates that the operation would exceed an + /// implementation-defined limit on field sizes. This may apply to + /// an individual `field-value`, a single `field-name` plus all its + /// values, or the total aggregate size of all fields. + SizeExceeded, + /// This is a catch-all error for anything that doesn't fit cleanly into a + /// more specific case. Implementations can use this to extend the error + /// type without breaking existing code. It also includes an optional + /// string for an unstructured description of the error. Users should not + /// depend on the string for diagnosing errors, as it's not required to be + /// consistent between implementations. + Other(Option<_rt::String>), } impl ::core::fmt::Debug for HeaderError { fn fmt( @@ -395,6 +407,12 @@ pub mod wasi { HeaderError::Immutable => { f.debug_tuple("HeaderError::Immutable").finish() } + HeaderError::SizeExceeded => { + f.debug_tuple("HeaderError::SizeExceeded").finish() + } + HeaderError::Other(e) => { + f.debug_tuple("HeaderError::Other").field(e).finish() + } } } } @@ -409,13 +427,20 @@ pub mod wasi { impl ::core::error::Error for HeaderError {} /// This type enumerates the different kinds of errors that may occur when /// setting fields of a `request-options` resource. - #[derive(Clone, Copy)] + #[derive(Clone)] pub enum RequestOptionsError { /// Indicates the specified field is not supported by this implementation. NotSupported, /// Indicates that the operation on the `request-options` was not permitted /// because it is immutable. Immutable, + /// This is a catch-all error for anything that doesn't fit cleanly into a + /// more specific case. Implementations can use this to extend the error + /// type without breaking existing code. It also includes an optional + /// string for an unstructured description of the error. Users should not + /// depend on the string for diagnosing errors, as it's not required to be + /// consistent between implementations. + Other(Option<_rt::String>), } impl ::core::fmt::Debug for RequestOptionsError { fn fmt( @@ -429,6 +454,9 @@ pub mod wasi { RequestOptionsError::Immutable => { f.debug_tuple("RequestOptionsError::Immutable").finish() } + RequestOptionsError::Other(e) => { + f.debug_tuple("RequestOptionsError::Other").field(e).finish() + } } } } @@ -465,6 +493,10 @@ pub mod wasi { /// original casing used to construct or mutate the `fields` resource. The `fields` /// resource should use that original casing when serializing the fields for /// transport or when returning them from a method. + /// + /// Implementations may impose limits on individual field values and on total + /// aggregate field section size. Operations that would exceed these limits + /// fail with `header-error.size-exceeded` #[derive(Debug)] #[repr(transparent)] pub struct Fields { @@ -490,7 +522,7 @@ pub mod wasi { #[inline] unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[resource-drop]fields"] fn drop(_: i32); @@ -534,7 +566,7 @@ pub mod wasi { #[inline] unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[resource-drop]request"] fn drop(_: i32); @@ -579,7 +611,7 @@ pub mod wasi { #[inline] unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[resource-drop]request-options"] fn drop(_: i32); @@ -621,7 +653,7 @@ pub mod wasi { #[inline] unsafe fn drop(_handle: u32) { #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[resource-drop]response"] fn drop(_: i32); @@ -645,7 +677,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[constructor]fields"] @@ -676,16 +708,23 @@ pub mod wasi { /// well-formed, so they are represented as a raw list of bytes. /// /// An error result will be returned if any header or value was - /// syntactically invalid, or if a header was forbidden. + /// syntactically invalid, if a header was forbidden, or if the + /// entries would exceed an implementation size limit. #[allow(async_fn_in_trait)] pub fn from_list( entries: &[(FieldName, FieldValue)], ) -> Result { unsafe { - #[repr(align(4))] - struct RetArea([::core::mem::MaybeUninit; 8]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 8], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let vec3 = entries; let len3 = vec3.len(); @@ -723,7 +762,7 @@ pub mod wasi { let ptr4 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]fields.from-list"] @@ -739,32 +778,67 @@ pub mod wasi { } wit_import5(result3, len3, ptr4); let l6 = i32::from(*ptr4.add(0).cast::()); - let result10 = match l6 { + let result14 = match l6 { 0 => { let e = { - let l7 = *ptr4.add(4).cast::(); + let l7 = *ptr4 + .add(::core::mem::size_of::<*const u8>()) + .cast::(); Fields::from_handle(l7 as u32) }; Ok(e) } 1 => { let e = { - let l8 = i32::from(*ptr4.add(4).cast::()); - let v9 = match l8 { + let l8 = i32::from( + *ptr4.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v13 = match l8 { 0 => HeaderError::InvalidSyntax, 1 => HeaderError::Forbidden, + 2 => HeaderError::Immutable, + 3 => HeaderError::SizeExceeded, n => { - debug_assert_eq!(n, 2, "invalid enum discriminant"); - HeaderError::Immutable + debug_assert_eq!(n, 4, "invalid enum discriminant"); + let e13 = { + let l9 = i32::from( + *ptr4 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l9 { + 0 => None, + 1 => { + let e = { + let l10 = *ptr4 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l11 = *ptr4 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len12 = l11; + let bytes12 = _rt::Vec::from_raw_parts( + l10.cast(), + len12, + len12, + ); + _rt::string_lift(bytes12) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + HeaderError::Other(e13) } }; - v9 + v13 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result10 + result14 } } } @@ -794,7 +868,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.get"] @@ -854,7 +928,7 @@ pub mod wasi { let len0 = vec0.len(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.has"] @@ -883,6 +957,9 @@ pub mod wasi { /// name, if they have been set. /// /// Fails with `header-error.immutable` if the `fields` are immutable. + /// + /// Fails with `header-error.size-exceeded` if the name or values would + /// exceed an implementation-defined size limit. #[allow(async_fn_in_trait)] pub fn set( &self, @@ -890,10 +967,16 @@ pub mod wasi { value: &[FieldValue], ) -> Result<(), HeaderError> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let vec0 = name; let ptr0 = vec0.as_ptr().cast::(); @@ -924,7 +1007,7 @@ pub mod wasi { let ptr3 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.set"] @@ -957,29 +1040,62 @@ pub mod wasi { ptr3, ); let l5 = i32::from(*ptr3.add(0).cast::()); - let result8 = match l5 { + let result12 = match l5 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l6 = i32::from(*ptr3.add(1).cast::()); - let v7 = match l6 { + let l6 = i32::from( + *ptr3.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v11 = match l6 { 0 => HeaderError::InvalidSyntax, 1 => HeaderError::Forbidden, + 2 => HeaderError::Immutable, + 3 => HeaderError::SizeExceeded, n => { - debug_assert_eq!(n, 2, "invalid enum discriminant"); - HeaderError::Immutable + debug_assert_eq!(n, 4, "invalid enum discriminant"); + let e11 = { + let l7 = i32::from( + *ptr3 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l7 { + 0 => None, + 1 => { + let e = { + let l8 = *ptr3 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l9 = *ptr3 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len10 = l9; + let bytes10 = _rt::Vec::from_raw_parts( + l8.cast(), + len10, + len10, + ); + _rt::string_lift(bytes10) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + HeaderError::Other(e11) } }; - v7 + v11 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result8 + result12 } } } @@ -992,10 +1108,16 @@ pub mod wasi { #[allow(async_fn_in_trait)] pub fn delete(&self, name: &str) -> Result<(), HeaderError> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let vec0 = name; let ptr0 = vec0.as_ptr().cast::(); @@ -1003,7 +1125,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.delete"] @@ -1020,29 +1142,62 @@ pub mod wasi { } wit_import2((self).handle() as i32, ptr0.cast_mut(), len0, ptr1); let l3 = i32::from(*ptr1.add(0).cast::()); - let result6 = match l3 { + let result10 = match l3 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr1.add(1).cast::()); - let v5 = match l4 { + let l4 = i32::from( + *ptr1.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { 0 => HeaderError::InvalidSyntax, 1 => HeaderError::Forbidden, + 2 => HeaderError::Immutable, + 3 => HeaderError::SizeExceeded, n => { - debug_assert_eq!(n, 2, "invalid enum discriminant"); - HeaderError::Immutable + debug_assert_eq!(n, 4, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr1 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr1 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr1 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + HeaderError::Other(e9) } }; - v5 + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result6 + result10 } } } @@ -1065,10 +1220,10 @@ pub mod wasi { struct RetArea( [::core::mem::MaybeUninit< u8, - >; 3 * ::core::mem::size_of::<*const u8>()], + >; 5 * ::core::mem::size_of::<*const u8>()], ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 3 + [::core::mem::MaybeUninit::uninit(); 5 * ::core::mem::size_of::<*const u8>()], ); let vec0 = name; @@ -1077,7 +1232,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.get-and-delete"] @@ -1094,7 +1249,7 @@ pub mod wasi { } wit_import2((self).handle() as i32, ptr0.cast_mut(), len0, ptr1); let l3 = i32::from(*ptr1.add(0).cast::()); - let result12 = match l3 { + let result16 = match l3 { 0 => { let e = { let l4 = *ptr1 @@ -1135,21 +1290,52 @@ pub mod wasi { let l10 = i32::from( *ptr1.add(::core::mem::size_of::<*const u8>()).cast::(), ); - let v11 = match l10 { + let v15 = match l10 { 0 => HeaderError::InvalidSyntax, 1 => HeaderError::Forbidden, + 2 => HeaderError::Immutable, + 3 => HeaderError::SizeExceeded, n => { - debug_assert_eq!(n, 2, "invalid enum discriminant"); - HeaderError::Immutable + debug_assert_eq!(n, 4, "invalid enum discriminant"); + let e15 = { + let l11 = i32::from( + *ptr1 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l11 { + 0 => None, + 1 => { + let e = { + let l12 = *ptr1 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l13 = *ptr1 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len14 = l13; + let bytes14 = _rt::Vec::from_raw_parts( + l12.cast(), + len14, + len14, + ); + _rt::string_lift(bytes14) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + HeaderError::Other(e15) } }; - v11 + v15 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result12 + result16 } } } @@ -1159,6 +1345,9 @@ pub mod wasi { /// values for that name. /// /// Fails with `header-error.immutable` if the `fields` are immutable. + /// + /// Fails with `header-error.size-exceeded` if the value would exceed + /// an implementation-defined size limit. #[allow(async_fn_in_trait)] pub fn append( &self, @@ -1166,10 +1355,16 @@ pub mod wasi { value: &[u8], ) -> Result<(), HeaderError> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let vec0 = name; let ptr0 = vec0.as_ptr().cast::(); @@ -1180,7 +1375,7 @@ pub mod wasi { let ptr2 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.append"] @@ -1213,29 +1408,62 @@ pub mod wasi { ptr2, ); let l4 = i32::from(*ptr2.add(0).cast::()); - let result7 = match l4 { + let result11 = match l4 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l5 = i32::from(*ptr2.add(1).cast::()); - let v6 = match l5 { + let l5 = i32::from( + *ptr2.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v10 = match l5 { 0 => HeaderError::InvalidSyntax, 1 => HeaderError::Forbidden, + 2 => HeaderError::Immutable, + 3 => HeaderError::SizeExceeded, n => { - debug_assert_eq!(n, 2, "invalid enum discriminant"); - HeaderError::Immutable + debug_assert_eq!(n, 4, "invalid enum discriminant"); + let e10 = { + let l6 = i32::from( + *ptr2 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l6 { + 0 => None, + 1 => { + let e = { + let l7 = *ptr2 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l8 = *ptr2 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len9 = l8; + let bytes9 = _rt::Vec::from_raw_parts( + l7.cast(), + len9, + len9, + ); + _rt::string_lift(bytes9) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + HeaderError::Other(e10) } }; - v6 + v10 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result7 + result11 } } } @@ -1267,7 +1495,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.copy-all"] @@ -1335,7 +1563,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]fields.clone"] @@ -1402,7 +1630,7 @@ pub mod wasi { let ptr2 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]request.new"] @@ -1473,7 +1701,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.get-method"] @@ -1546,7 +1774,7 @@ pub mod wasi { }; #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.set-method"] @@ -1602,7 +1830,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.get-path-with-query"] @@ -1662,7 +1890,7 @@ pub mod wasi { }; #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.set-path-with-query"] @@ -1718,7 +1946,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.get-scheme"] @@ -1796,7 +2024,7 @@ pub mod wasi { }; #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.set-scheme"] @@ -1861,7 +2089,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.get-authority"] @@ -1919,7 +2147,7 @@ pub mod wasi { }; #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.set-authority"] @@ -1975,7 +2203,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.get-options"] @@ -2013,7 +2241,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request.get-headers"] @@ -2063,7 +2291,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]request.consume-body"] @@ -2105,7 +2333,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[constructor]request-options"] @@ -2134,7 +2362,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.get-connect-timeout"] @@ -2172,10 +2400,16 @@ pub mod wasi { duration: Option, ) -> Result<(), RequestOptionsError> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let (result0_0, result0_1) = match duration { Some(e) => (1i32, _rt::as_i64(e)), @@ -2184,7 +2418,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.set-connect-timeout"] @@ -2201,28 +2435,60 @@ pub mod wasi { } wit_import2((self).handle() as i32, result0_0, result0_1, ptr1); let l3 = i32::from(*ptr1.add(0).cast::()); - let result6 = match l3 { + let result10 = match l3 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr1.add(1).cast::()); - let v5 = match l4 { + let l4 = i32::from( + *ptr1.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { 0 => RequestOptionsError::NotSupported, + 1 => RequestOptionsError::Immutable, n => { - debug_assert_eq!(n, 1, "invalid enum discriminant"); - RequestOptionsError::Immutable + debug_assert_eq!(n, 2, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr1 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr1 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr1 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + RequestOptionsError::Other(e9) } }; - v5 + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result6 + result10 } } } @@ -2240,7 +2506,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.get-first-byte-timeout"] @@ -2278,10 +2544,16 @@ pub mod wasi { duration: Option, ) -> Result<(), RequestOptionsError> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let (result0_0, result0_1) = match duration { Some(e) => (1i32, _rt::as_i64(e)), @@ -2290,7 +2562,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.set-first-byte-timeout"] @@ -2307,28 +2579,60 @@ pub mod wasi { } wit_import2((self).handle() as i32, result0_0, result0_1, ptr1); let l3 = i32::from(*ptr1.add(0).cast::()); - let result6 = match l3 { + let result10 = match l3 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr1.add(1).cast::()); - let v5 = match l4 { + let l4 = i32::from( + *ptr1.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { 0 => RequestOptionsError::NotSupported, + 1 => RequestOptionsError::Immutable, n => { - debug_assert_eq!(n, 1, "invalid enum discriminant"); - RequestOptionsError::Immutable + debug_assert_eq!(n, 2, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr1 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr1 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr1 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + RequestOptionsError::Other(e9) } }; - v5 + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result6 + result10 } } } @@ -2347,7 +2651,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.get-between-bytes-timeout"] @@ -2385,10 +2689,16 @@ pub mod wasi { duration: Option, ) -> Result<(), RequestOptionsError> { unsafe { - #[repr(align(1))] - struct RetArea([::core::mem::MaybeUninit; 2]); + #[cfg_attr(target_pointer_width = "64", repr(align(8)))] + #[cfg_attr(target_pointer_width = "32", repr(align(4)))] + struct RetArea( + [::core::mem::MaybeUninit< + u8, + >; 5 * ::core::mem::size_of::<*const u8>()], + ); let mut ret_area = RetArea( - [::core::mem::MaybeUninit::uninit(); 2], + [::core::mem::MaybeUninit::uninit(); 5 + * ::core::mem::size_of::<*const u8>()], ); let (result0_0, result0_1) = match duration { Some(e) => (1i32, _rt::as_i64(e)), @@ -2397,7 +2707,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.set-between-bytes-timeout"] @@ -2414,28 +2724,60 @@ pub mod wasi { } wit_import2((self).handle() as i32, result0_0, result0_1, ptr1); let l3 = i32::from(*ptr1.add(0).cast::()); - let result6 = match l3 { + let result10 = match l3 { 0 => { let e = (); Ok(e) } 1 => { let e = { - let l4 = i32::from(*ptr1.add(1).cast::()); - let v5 = match l4 { + let l4 = i32::from( + *ptr1.add(::core::mem::size_of::<*const u8>()).cast::(), + ); + let v9 = match l4 { 0 => RequestOptionsError::NotSupported, + 1 => RequestOptionsError::Immutable, n => { - debug_assert_eq!(n, 1, "invalid enum discriminant"); - RequestOptionsError::Immutable + debug_assert_eq!(n, 2, "invalid enum discriminant"); + let e9 = { + let l5 = i32::from( + *ptr1 + .add(2 * ::core::mem::size_of::<*const u8>()) + .cast::(), + ); + match l5 { + 0 => None, + 1 => { + let e = { + let l6 = *ptr1 + .add(3 * ::core::mem::size_of::<*const u8>()) + .cast::<*mut u8>(); + let l7 = *ptr1 + .add(4 * ::core::mem::size_of::<*const u8>()) + .cast::(); + let len8 = l7; + let bytes8 = _rt::Vec::from_raw_parts( + l6.cast(), + len8, + len8, + ); + _rt::string_lift(bytes8) + }; + Some(e) + } + _ => _rt::invalid_enum_discriminant(), + } + }; + RequestOptionsError::Other(e9) } }; - v5 + v9 }; Err(e) } _ => _rt::invalid_enum_discriminant(), }; - result6 + result10 } } } @@ -2448,7 +2790,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]request-options.clone"] @@ -2502,7 +2844,7 @@ pub mod wasi { let ptr1 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]response.new"] @@ -2549,7 +2891,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]response.get-status-code"] @@ -2576,7 +2918,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]response.set-status-code"] @@ -2615,7 +2957,7 @@ pub mod wasi { unsafe { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[method]response.get-headers"] @@ -2665,7 +3007,7 @@ pub mod wasi { let ptr0 = ret_area.0.as_mut_ptr().cast::(); #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[static]response.consume-body"] @@ -2755,7 +3097,7 @@ pub mod wasi { ) -> u32 { #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "wasi:http/client@0.3.0-rc-2026-02-09" + wasm_import_module = "wasi:http/client@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[async-lower]send"] @@ -3367,13 +3709,13 @@ pub mod exports { pub type ErrorCode = super::super::super::super::wasi::http::types::ErrorCode; #[doc(hidden)] #[allow(non_snake_case, unused_unsafe)] - pub unsafe fn _export_handle_cabi(arg0: i32) -> i32 { + pub unsafe fn _export_handle_cabi(arg0: i32) -> i32 { unsafe { #[cfg(target_arch = "wasm32")] _rt::run_ctors_once(); wit_bindgen::rt::async_support::start_task(async move { let _task_cancel = wit_bindgen::rt::async_support::TaskCancelOnDrop::new(); let result0 = &{ - T::handle( + T_::handle( super::super::super::super::wasi::http::types::Request::from_handle( arg0 as u32, ), @@ -4060,7 +4402,7 @@ pub mod exports { }; #[cfg(target_arch = "wasm32")] #[link( - wasm_import_module = "[export]wasi:http/handler@0.3.0-rc-2026-02-09" + wasm_import_module = "[export]wasi:http/handler@0.3.0-rc-2026-03-15" )] unsafe extern "C" { #[link_name = "[task-return]handle"] @@ -4121,21 +4463,21 @@ pub mod exports { } #[doc(hidden)] #[macro_export] - macro_rules! __export_wasi_http_handler_0_3_0_rc_2026_02_09_cabi { + macro_rules! __export_wasi_http_handler_0_3_0_rc_2026_03_15_cabi { ($ty:ident with_types_in $($path_to_types:tt)*) => { const _ : () = { #[unsafe (export_name = - "[async-lift]wasi:http/handler@0.3.0-rc-2026-02-09#handle")] + "[async-lift]wasi:http/handler@0.3.0-rc-2026-03-15#handle")] unsafe extern "C" fn export_handle(arg0 : i32,) -> i32 { unsafe { $($path_to_types)*:: _export_handle_cabi::<$ty > (arg0) } } #[unsafe (export_name = - "[callback][async-lift]wasi:http/handler@0.3.0-rc-2026-02-09#handle")] + "[callback][async-lift]wasi:http/handler@0.3.0-rc-2026-03-15#handle")] unsafe extern "C" fn _callback_handle(event0 : u32, event1 : u32, event2 : u32) -> u32 { unsafe { $($path_to_types)*:: __callback_handle(event0, event1, event2) } } }; }; } #[doc(hidden)] - pub use __export_wasi_http_handler_0_3_0_rc_2026_02_09_cabi; + pub use __export_wasi_http_handler_0_3_0_rc_2026_03_15_cabi; } } } @@ -4220,6 +4562,13 @@ mod _rt { } } pub use alloc_crate::alloc; + pub unsafe fn string_lift(bytes: Vec) -> String { + if cfg!(debug_assertions) { + String::from_utf8(bytes).unwrap() + } else { + unsafe { String::from_utf8_unchecked(bytes) } + } + } pub unsafe fn invalid_enum_discriminant() -> T { if cfg!(debug_assertions) { panic!("invalid enum discriminant") @@ -4247,13 +4596,6 @@ mod _rt { val != 0 } } - pub unsafe fn string_lift(bytes: Vec) -> String { - if cfg!(debug_assertions) { - String::from_utf8(bytes).unwrap() - } else { - unsafe { String::from_utf8_unchecked(bytes) } - } - } pub fn as_i32(t: T) -> i32 { t.as_i32() } @@ -4380,7 +4722,7 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[future-new-1][static]request.new"] fn new() -> u64; @@ -5695,7 +6037,7 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[future-new-2][static]request.new"] fn new() -> u64; @@ -6989,7 +7331,7 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-02-09")] + #[link(wasm_import_module = "wasi:http/types@0.3.0-rc-2026-03-15")] unsafe extern "C" { #[link_name = "[stream-new-0][static]request.new"] fn new() -> u64; @@ -7058,25 +7400,25 @@ macro_rules! __export_service_impl { }; ($ty:ident with_types_in $($path_to_types_root:tt)*) => { $($path_to_types_root)*:: - exports::wasi::http::handler::__export_wasi_http_handler_0_3_0_rc_2026_02_09_cabi!($ty + exports::wasi::http::handler::__export_wasi_http_handler_0_3_0_rc_2026_03_15_cabi!($ty with_types_in $($path_to_types_root)*:: exports::wasi::http::handler); const _ : () = { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe (link_section = - "component-type:wit-bindgen:0.53.0:wasi:http@0.3.0-rc-2026-02-09:service:imports and exportsrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io-service-world")] + "component-type:wit-bindgen:0.54.0:wasi:http@0.3.0-rc-2026-03-15:service:imports and exportsrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io-service-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static - __WIT_BINDGEN_COMPONENT_TYPE : [u8; 5149] = * + __WIT_BINDGEN_COMPONENT_TYPE : [u8; 5191] = * b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\x9f'\x01A\x02\x01A\x1f\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xc9'\x01A\x02\x01A\x1f\ \x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\0\x0aerror-code\x03\ -\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-02-09\x05\0\x02\x03\0\0\x0aerror-code\x01\ +\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-03-15\x05\0\x02\x03\0\0\x0aerror-code\x01\ B\x07\x02\x03\x02\x01\x01\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01\ e\x01\x03\x01@\x01\x04data\x02\0\x04\x04\0\x10write-via-stream\x01\x05\x03\0#was\ -i:cli/stdout@0.3.0-rc-2026-02-09\x05\x02\x01B\x07\x02\x03\x02\x01\x01\x04\0\x0ae\ +i:cli/stdout@0.3.0-rc-2026-03-15\x05\x02\x01B\x07\x02\x03\x02\x01\x01\x04\0\x0ae\ rror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01@\x01\x04data\x02\0\x04\ -\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-02-09\x05\ +\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-03-15\x05\ \x03\x01B\x08\x02\x03\x02\x01\x01\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\ \x01\x01e\x01\x03\x01o\x02\x02\x04\x01@\0\0\x05\x04\0\x0fread-via-stream\x01\x06\ -\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-02-09\x05\x04\x01B\x02\x01w\x04\0\x08durati\ -on\x03\0\0\x03\0%wasi:clocks/types@0.3.0-rc-2026-02-09\x05\x05\x02\x03\0\x04\x08\ +\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-03-15\x05\x04\x01B\x02\x01w\x04\0\x08durati\ +on\x03\0\0\x03\0%wasi:clocks/types@0.3.0-rc-2026-03-15\x05\x05\x02\x03\0\x04\x08\ duration\x01B\x84\x01\x02\x03\x02\x01\x06\x04\0\x08duration\x03\0\0\x01q\x0a\x03\ get\0\0\x04head\0\0\x04post\0\0\x03put\0\0\x06delete\0\0\x07connect\0\0\x07optio\ ns\0\0\x05trace\0\0\x05patch\0\0\x05other\x01s\0\x04\0\x06method\x03\0\x02\x01q\x03\ @@ -7100,73 +7442,74 @@ e-body-size\x01\x10\0\"HTTP-response-trailer-section-size\x01\x0d\0\x1aHTTP-resp onse-trailer-size\x01\x0f\0\x1dHTTP-response-transfer-coding\x01\x06\0\x1cHTTP-r\ esponse-content-coding\x01\x06\0\x15HTTP-response-timeout\0\0\x13HTTP-upgrade-fa\ iled\0\0\x13HTTP-protocol-error\0\0\x0dloop-detected\0\0\x13configuration-error\0\ -\0\x0einternal-error\x01\x06\0\x04\0\x0aerror-code\x03\0\x12\x01q\x03\x0einvalid\ --syntax\0\0\x09forbidden\0\0\x09immutable\0\0\x04\0\x0cheader-error\x03\0\x14\x01\ -q\x02\x0dnot-supported\0\0\x09immutable\0\0\x04\0\x15request-options-error\x03\0\ -\x16\x01s\x04\0\x0afield-name\x03\0\x18\x01p}\x04\0\x0bfield-value\x03\0\x1a\x04\ -\0\x06fields\x03\x01\x04\0\x07headers\x03\0\x1c\x04\0\x08trailers\x03\0\x1c\x04\0\ -\x07request\x03\x01\x04\0\x0frequest-options\x03\x01\x01{\x04\0\x0bstatus-code\x03\ -\0!\x04\0\x08response\x03\x01\x01i\x1c\x01@\0\0$\x04\0\x13[constructor]fields\x01\ -%\x01o\x02\x19\x1b\x01p&\x01j\x01$\x01\x15\x01@\x01\x07entries'\0(\x04\0\x18[sta\ -tic]fields.from-list\x01)\x01h\x1c\x01p\x1b\x01@\x02\x04self*\x04name\x19\0+\x04\ -\0\x12[method]fields.get\x01,\x01@\x02\x04self*\x04name\x19\0\x7f\x04\0\x12[meth\ -od]fields.has\x01-\x01j\0\x01\x15\x01@\x03\x04self*\x04name\x19\x05value+\0.\x04\ -\0\x12[method]fields.set\x01/\x01@\x02\x04self*\x04name\x19\0.\x04\0\x15[method]\ -fields.delete\x010\x01j\x01+\x01\x15\x01@\x02\x04self*\x04name\x19\01\x04\0\x1d[\ -method]fields.get-and-delete\x012\x01@\x03\x04self*\x04name\x19\x05value\x1b\0.\x04\ -\0\x15[method]fields.append\x013\x01@\x01\x04self*\0'\x04\0\x17[method]fields.co\ -py-all\x014\x01@\x01\x04self*\0$\x04\0\x14[method]fields.clone\x015\x01i\x1d\x01\ -f\x01}\x01k7\x01i\x1e\x01k9\x01j\x01:\x01\x13\x01e\x01;\x01i\x20\x01k=\x01i\x1f\x01\ -j\0\x01\x13\x01e\x01\xc0\0\x01o\x02?\xc1\0\x01@\x04\x07headers6\x08contents8\x08\ -trailers<\x07options>\0\xc2\0\x04\0\x13[static]request.new\x01C\x01h\x1f\x01@\x01\ -\x04self\xc4\0\0\x03\x04\0\x1a[method]request.get-method\x01E\x01j\0\0\x01@\x02\x04\ -self\xc4\0\x06method\x03\0\xc6\0\x04\0\x1a[method]request.set-method\x01G\x01@\x01\ -\x04self\xc4\0\0\x06\x04\0#[method]request.get-path-with-query\x01H\x01@\x02\x04\ -self\xc4\0\x0fpath-with-query\x06\0\xc6\0\x04\0#[method]request.set-path-with-qu\ -ery\x01I\x01k\x05\x01@\x01\x04self\xc4\0\0\xca\0\x04\0\x1a[method]request.get-sc\ -heme\x01K\x01@\x02\x04self\xc4\0\x06scheme\xca\0\0\xc6\0\x04\0\x1a[method]reques\ -t.set-scheme\x01L\x04\0\x1d[method]request.get-authority\x01H\x01@\x02\x04self\xc4\ -\0\x09authority\x06\0\xc6\0\x04\0\x1d[method]request.set-authority\x01M\x01@\x01\ -\x04self\xc4\0\0>\x04\0\x1b[method]request.get-options\x01N\x01@\x01\x04self\xc4\ -\0\06\x04\0\x1b[method]request.get-headers\x01O\x01o\x027<\x01@\x02\x04this?\x03\ -res\xc1\0\0\xd0\0\x04\0\x1c[static]request.consume-body\x01Q\x01@\0\0=\x04\0\x1c\ -[constructor]request-options\x01R\x01h\x20\x01k\x01\x01@\x01\x04self\xd3\0\0\xd4\ -\0\x04\0+[method]request-options.get-connect-timeout\x01U\x01j\0\x01\x17\x01@\x02\ -\x04self\xd3\0\x08duration\xd4\0\0\xd6\0\x04\0+[method]request-options.set-conne\ -ct-timeout\x01W\x04\0.[method]request-options.get-first-byte-timeout\x01U\x04\0.\ -[method]request-options.set-first-byte-timeout\x01W\x04\01[method]request-option\ -s.get-between-bytes-timeout\x01U\x04\01[method]request-options.set-between-bytes\ --timeout\x01W\x01@\x01\x04self\xd3\0\0=\x04\0\x1d[method]request-options.clone\x01\ -X\x01i#\x01o\x02\xd9\0\xc1\0\x01@\x03\x07headers6\x08contents8\x08trailers<\0\xda\ -\0\x04\0\x14[static]response.new\x01[\x01h#\x01@\x01\x04self\xdc\0\0\"\x04\0\x20\ -[method]response.get-status-code\x01]\x01@\x02\x04self\xdc\0\x0bstatus-code\"\0\xc6\ -\0\x04\0\x20[method]response.set-status-code\x01^\x01@\x01\x04self\xdc\0\06\x04\0\ -\x1c[method]response.get-headers\x01_\x01@\x02\x04this\xd9\0\x03res\xc1\0\0\xd0\0\ -\x04\0\x1d[static]response.consume-body\x01`\x03\0#wasi:http/types@0.3.0-rc-2026\ --02-09\x05\x07\x02\x03\0\x05\x07request\x02\x03\0\x05\x08response\x02\x03\0\x05\x0a\ -error-code\x01B\x0b\x02\x03\x02\x01\x08\x04\0\x07request\x03\0\0\x02\x03\x02\x01\ -\x09\x04\0\x08response\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\ -\x01i\x01\x01i\x03\x01j\x01\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x04s\ -end\x01\x09\x03\0$wasi:http/client@0.3.0-rc-2026-02-09\x05\x0b\x01B\x0c\x02\x03\x02\ -\x01\x06\x04\0\x08duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\ -\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\ -\x01\0\x04\0\x0await-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-\ -for\x01\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09\x05\x0c\x01B\x08\ -\x02\x03\x02\x01\x06\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecon\ -dsy\x04\0\x07instant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\ -\0\x0eget-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-02-09\x05\ -\x0d\x01B\x05\x01p}\x01@\x01\x03lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\ -\0w\x04\0\x0eget-random-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-02-09\ -\x05\x0e\x01B\x05\x01p}\x01@\x01\x03lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\ -\x01\x01@\0\0w\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecu\ -re@0.3.0-rc-2026-02-09\x05\x0f\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insec\ -ure-seed\x01\x01\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-02-09\x05\x10\x01\ -B\x0b\x02\x03\x02\x01\x08\x04\0\x07request\x03\0\0\x02\x03\x02\x01\x09\x04\0\x08\ -response\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\x01i\x01\x01\ -i\x03\x01j\x01\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x06handle\x01\x09\ -\x04\0%wasi:http/handler@0.3.0-rc-2026-02-09\x05\x11\x04\0%wasi:http/service@0.3\ -.0-rc-2026-02-09\x04\0\x0b\x0d\x01\0\x07service\x03\0\0\0G\x09producers\x01\x0cp\ -rocessed-by\x02\x0dwit-component\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +\0\x0einternal-error\x01\x06\0\x04\0\x0aerror-code\x03\0\x12\x01q\x05\x0einvalid\ +-syntax\0\0\x09forbidden\0\0\x09immutable\0\0\x0dsize-exceeded\0\0\x05other\x01\x06\ +\0\x04\0\x0cheader-error\x03\0\x14\x01q\x03\x0dnot-supported\0\0\x09immutable\0\0\ +\x05other\x01\x06\0\x04\0\x15request-options-error\x03\0\x16\x01s\x04\0\x0afield\ +-name\x03\0\x18\x01p}\x04\0\x0bfield-value\x03\0\x1a\x04\0\x06fields\x03\x01\x04\ +\0\x07headers\x03\0\x1c\x04\0\x08trailers\x03\0\x1c\x04\0\x07request\x03\x01\x04\ +\0\x0frequest-options\x03\x01\x01{\x04\0\x0bstatus-code\x03\0!\x04\0\x08response\ +\x03\x01\x01i\x1c\x01@\0\0$\x04\0\x13[constructor]fields\x01%\x01o\x02\x19\x1b\x01\ +p&\x01j\x01$\x01\x15\x01@\x01\x07entries'\0(\x04\0\x18[static]fields.from-list\x01\ +)\x01h\x1c\x01p\x1b\x01@\x02\x04self*\x04name\x19\0+\x04\0\x12[method]fields.get\ +\x01,\x01@\x02\x04self*\x04name\x19\0\x7f\x04\0\x12[method]fields.has\x01-\x01j\0\ +\x01\x15\x01@\x03\x04self*\x04name\x19\x05value+\0.\x04\0\x12[method]fields.set\x01\ +/\x01@\x02\x04self*\x04name\x19\0.\x04\0\x15[method]fields.delete\x010\x01j\x01+\ +\x01\x15\x01@\x02\x04self*\x04name\x19\01\x04\0\x1d[method]fields.get-and-delete\ +\x012\x01@\x03\x04self*\x04name\x19\x05value\x1b\0.\x04\0\x15[method]fields.appe\ +nd\x013\x01@\x01\x04self*\0'\x04\0\x17[method]fields.copy-all\x014\x01@\x01\x04s\ +elf*\0$\x04\0\x14[method]fields.clone\x015\x01i\x1d\x01f\x01}\x01k7\x01i\x1e\x01\ +k9\x01j\x01:\x01\x13\x01e\x01;\x01i\x20\x01k=\x01i\x1f\x01j\0\x01\x13\x01e\x01\xc0\ +\0\x01o\x02?\xc1\0\x01@\x04\x07headers6\x08contents8\x08trailers<\x07options>\0\xc2\ +\0\x04\0\x13[static]request.new\x01C\x01h\x1f\x01@\x01\x04self\xc4\0\0\x03\x04\0\ +\x1a[method]request.get-method\x01E\x01j\0\0\x01@\x02\x04self\xc4\0\x06method\x03\ +\0\xc6\0\x04\0\x1a[method]request.set-method\x01G\x01@\x01\x04self\xc4\0\0\x06\x04\ +\0#[method]request.get-path-with-query\x01H\x01@\x02\x04self\xc4\0\x0fpath-with-\ +query\x06\0\xc6\0\x04\0#[method]request.set-path-with-query\x01I\x01k\x05\x01@\x01\ +\x04self\xc4\0\0\xca\0\x04\0\x1a[method]request.get-scheme\x01K\x01@\x02\x04self\ +\xc4\0\x06scheme\xca\0\0\xc6\0\x04\0\x1a[method]request.set-scheme\x01L\x04\0\x1d\ +[method]request.get-authority\x01H\x01@\x02\x04self\xc4\0\x09authority\x06\0\xc6\ +\0\x04\0\x1d[method]request.set-authority\x01M\x01@\x01\x04self\xc4\0\0>\x04\0\x1b\ +[method]request.get-options\x01N\x01@\x01\x04self\xc4\0\06\x04\0\x1b[method]requ\ +est.get-headers\x01O\x01o\x027<\x01@\x02\x04this?\x03res\xc1\0\0\xd0\0\x04\0\x1c\ +[static]request.consume-body\x01Q\x01@\0\0=\x04\0\x1c[constructor]request-option\ +s\x01R\x01h\x20\x01k\x01\x01@\x01\x04self\xd3\0\0\xd4\0\x04\0+[method]request-op\ +tions.get-connect-timeout\x01U\x01j\0\x01\x17\x01@\x02\x04self\xd3\0\x08duration\ +\xd4\0\0\xd6\0\x04\0+[method]request-options.set-connect-timeout\x01W\x04\0.[met\ +hod]request-options.get-first-byte-timeout\x01U\x04\0.[method]request-options.se\ +t-first-byte-timeout\x01W\x04\01[method]request-options.get-between-bytes-timeou\ +t\x01U\x04\01[method]request-options.set-between-bytes-timeout\x01W\x01@\x01\x04\ +self\xd3\0\0=\x04\0\x1d[method]request-options.clone\x01X\x01i#\x01o\x02\xd9\0\xc1\ +\0\x01@\x03\x07headers6\x08contents8\x08trailers<\0\xda\0\x04\0\x14[static]respo\ +nse.new\x01[\x01h#\x01@\x01\x04self\xdc\0\0\"\x04\0\x20[method]response.get-stat\ +us-code\x01]\x01@\x02\x04self\xdc\0\x0bstatus-code\"\0\xc6\0\x04\0\x20[method]re\ +sponse.set-status-code\x01^\x01@\x01\x04self\xdc\0\06\x04\0\x1c[method]response.\ +get-headers\x01_\x01@\x02\x04this\xd9\0\x03res\xc1\0\0\xd0\0\x04\0\x1d[static]re\ +sponse.consume-body\x01`\x03\0#wasi:http/types@0.3.0-rc-2026-03-15\x05\x07\x02\x03\ +\0\x05\x07request\x02\x03\0\x05\x08response\x02\x03\0\x05\x0aerror-code\x01B\x0b\ +\x02\x03\x02\x01\x08\x04\0\x07request\x03\0\0\x02\x03\x02\x01\x09\x04\0\x08respo\ +nse\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\x01i\x01\x01i\x03\ +\x01j\x01\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x04send\x01\x09\x03\0$\ +wasi:http/client@0.3.0-rc-2026-03-15\x05\x0b\x01B\x0c\x02\x03\x02\x01\x06\x04\0\x08\ +duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01\ +@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\x01\0\x04\0\x0awa\ +it-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-for\x01\x07\x03\0/\ +wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15\x05\x0c\x01B\x08\x02\x03\x02\x01\ +\x06\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecondsy\x04\0\x07ins\ +tant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0eget-resol\ +ution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-03-15\x05\x0d\x01B\x05\ +\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\ +\x0eget-random-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-03-15\x05\x0e\x01\ +B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01\ +@\0\0w\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0\ +-rc-2026-03-15\x05\x0f\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\ +\x01\x01\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-03-15\x05\x10\x01B\x0b\x02\ +\x03\x02\x01\x08\x04\0\x07request\x03\0\0\x02\x03\x02\x01\x09\x04\0\x08response\x03\ +\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\x01i\x01\x01i\x03\x01j\x01\ +\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x06handle\x01\x09\x04\0%wasi:ht\ +tp/handler@0.3.0-rc-2026-03-15\x05\x11\x04\0%wasi:http/service@0.3.0-rc-2026-03-\ +15\x04\0\x0b\x0d\x01\0\x07service\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\ +\x0dwit-component\x070.245.1\x10wit-bindgen-rust\x060.54.0"; }; }; } @@ -7175,23 +7518,23 @@ pub use __export_service_impl as _export_service; #[rustfmt::skip] #[cfg(target_arch = "wasm32")] #[unsafe( - link_section = "component-type:wit-bindgen:0.53.0:wasi:http@0.3.0-rc-2026-02-09:service-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-02-09-from-crates-io-service-world" + link_section = "component-type:wit-bindgen:0.54.0:wasi:http@0.3.0-rc-2026-03-15:service-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.5.0+wasi-0.3.0-rc-2026-03-15-from-crates-io-service-world" )] #[doc(hidden)] #[allow(clippy::octal_escapes)] -pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5073] = *b"\ -\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xb3&\x01A\x02\x01A\x1d\ +pub static __WIT_BINDGEN_COMPONENT_TYPE: [u8; 5115] = *b"\ +\0asm\x0d\0\x01\0\0\x19\x16wit-component-encoding\x04\0\x07\xdd&\x01A\x02\x01A\x1d\ \x01B\x02\x01m\x03\x02io\x15illegal-byte-sequence\x04pipe\x04\0\x0aerror-code\x03\ -\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-02-09\x05\0\x02\x03\0\0\x0aerror-code\x01\ +\0\0\x03\0\"wasi:cli/types@0.3.0-rc-2026-03-15\x05\0\x02\x03\0\0\x0aerror-code\x01\ B\x07\x02\x03\x02\x01\x01\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01\ e\x01\x03\x01@\x01\x04data\x02\0\x04\x04\0\x10write-via-stream\x01\x05\x03\0#was\ -i:cli/stdout@0.3.0-rc-2026-02-09\x05\x02\x01B\x07\x02\x03\x02\x01\x01\x04\0\x0ae\ +i:cli/stdout@0.3.0-rc-2026-03-15\x05\x02\x01B\x07\x02\x03\x02\x01\x01\x04\0\x0ae\ rror-code\x03\0\0\x01f\x01}\x01j\0\x01\x01\x01e\x01\x03\x01@\x01\x04data\x02\0\x04\ -\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-02-09\x05\ +\x04\0\x10write-via-stream\x01\x05\x03\0#wasi:cli/stderr@0.3.0-rc-2026-03-15\x05\ \x03\x01B\x08\x02\x03\x02\x01\x01\x04\0\x0aerror-code\x03\0\0\x01f\x01}\x01j\0\x01\ \x01\x01e\x01\x03\x01o\x02\x02\x04\x01@\0\0\x05\x04\0\x0fread-via-stream\x01\x06\ -\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-02-09\x05\x04\x01B\x02\x01w\x04\0\x08durati\ -on\x03\0\0\x03\0%wasi:clocks/types@0.3.0-rc-2026-02-09\x05\x05\x02\x03\0\x04\x08\ +\x03\0\"wasi:cli/stdin@0.3.0-rc-2026-03-15\x05\x04\x01B\x02\x01w\x04\0\x08durati\ +on\x03\0\0\x03\0%wasi:clocks/types@0.3.0-rc-2026-03-15\x05\x05\x02\x03\0\x04\x08\ duration\x01B\x84\x01\x02\x03\x02\x01\x06\x04\0\x08duration\x03\0\0\x01q\x0a\x03\ get\0\0\x04head\0\0\x04post\0\0\x03put\0\0\x06delete\0\0\x07connect\0\0\x07optio\ ns\0\0\x05trace\0\0\x05patch\0\0\x05other\x01s\0\x04\0\x06method\x03\0\x02\x01q\x03\ @@ -7215,70 +7558,71 @@ e-body-size\x01\x10\0\"HTTP-response-trailer-section-size\x01\x0d\0\x1aHTTP-resp onse-trailer-size\x01\x0f\0\x1dHTTP-response-transfer-coding\x01\x06\0\x1cHTTP-r\ esponse-content-coding\x01\x06\0\x15HTTP-response-timeout\0\0\x13HTTP-upgrade-fa\ iled\0\0\x13HTTP-protocol-error\0\0\x0dloop-detected\0\0\x13configuration-error\0\ -\0\x0einternal-error\x01\x06\0\x04\0\x0aerror-code\x03\0\x12\x01q\x03\x0einvalid\ --syntax\0\0\x09forbidden\0\0\x09immutable\0\0\x04\0\x0cheader-error\x03\0\x14\x01\ -q\x02\x0dnot-supported\0\0\x09immutable\0\0\x04\0\x15request-options-error\x03\0\ -\x16\x01s\x04\0\x0afield-name\x03\0\x18\x01p}\x04\0\x0bfield-value\x03\0\x1a\x04\ -\0\x06fields\x03\x01\x04\0\x07headers\x03\0\x1c\x04\0\x08trailers\x03\0\x1c\x04\0\ -\x07request\x03\x01\x04\0\x0frequest-options\x03\x01\x01{\x04\0\x0bstatus-code\x03\ -\0!\x04\0\x08response\x03\x01\x01i\x1c\x01@\0\0$\x04\0\x13[constructor]fields\x01\ -%\x01o\x02\x19\x1b\x01p&\x01j\x01$\x01\x15\x01@\x01\x07entries'\0(\x04\0\x18[sta\ -tic]fields.from-list\x01)\x01h\x1c\x01p\x1b\x01@\x02\x04self*\x04name\x19\0+\x04\ -\0\x12[method]fields.get\x01,\x01@\x02\x04self*\x04name\x19\0\x7f\x04\0\x12[meth\ -od]fields.has\x01-\x01j\0\x01\x15\x01@\x03\x04self*\x04name\x19\x05value+\0.\x04\ -\0\x12[method]fields.set\x01/\x01@\x02\x04self*\x04name\x19\0.\x04\0\x15[method]\ -fields.delete\x010\x01j\x01+\x01\x15\x01@\x02\x04self*\x04name\x19\01\x04\0\x1d[\ -method]fields.get-and-delete\x012\x01@\x03\x04self*\x04name\x19\x05value\x1b\0.\x04\ -\0\x15[method]fields.append\x013\x01@\x01\x04self*\0'\x04\0\x17[method]fields.co\ -py-all\x014\x01@\x01\x04self*\0$\x04\0\x14[method]fields.clone\x015\x01i\x1d\x01\ -f\x01}\x01k7\x01i\x1e\x01k9\x01j\x01:\x01\x13\x01e\x01;\x01i\x20\x01k=\x01i\x1f\x01\ -j\0\x01\x13\x01e\x01\xc0\0\x01o\x02?\xc1\0\x01@\x04\x07headers6\x08contents8\x08\ -trailers<\x07options>\0\xc2\0\x04\0\x13[static]request.new\x01C\x01h\x1f\x01@\x01\ -\x04self\xc4\0\0\x03\x04\0\x1a[method]request.get-method\x01E\x01j\0\0\x01@\x02\x04\ -self\xc4\0\x06method\x03\0\xc6\0\x04\0\x1a[method]request.set-method\x01G\x01@\x01\ -\x04self\xc4\0\0\x06\x04\0#[method]request.get-path-with-query\x01H\x01@\x02\x04\ -self\xc4\0\x0fpath-with-query\x06\0\xc6\0\x04\0#[method]request.set-path-with-qu\ -ery\x01I\x01k\x05\x01@\x01\x04self\xc4\0\0\xca\0\x04\0\x1a[method]request.get-sc\ -heme\x01K\x01@\x02\x04self\xc4\0\x06scheme\xca\0\0\xc6\0\x04\0\x1a[method]reques\ -t.set-scheme\x01L\x04\0\x1d[method]request.get-authority\x01H\x01@\x02\x04self\xc4\ -\0\x09authority\x06\0\xc6\0\x04\0\x1d[method]request.set-authority\x01M\x01@\x01\ -\x04self\xc4\0\0>\x04\0\x1b[method]request.get-options\x01N\x01@\x01\x04self\xc4\ -\0\06\x04\0\x1b[method]request.get-headers\x01O\x01o\x027<\x01@\x02\x04this?\x03\ -res\xc1\0\0\xd0\0\x04\0\x1c[static]request.consume-body\x01Q\x01@\0\0=\x04\0\x1c\ -[constructor]request-options\x01R\x01h\x20\x01k\x01\x01@\x01\x04self\xd3\0\0\xd4\ -\0\x04\0+[method]request-options.get-connect-timeout\x01U\x01j\0\x01\x17\x01@\x02\ -\x04self\xd3\0\x08duration\xd4\0\0\xd6\0\x04\0+[method]request-options.set-conne\ -ct-timeout\x01W\x04\0.[method]request-options.get-first-byte-timeout\x01U\x04\0.\ -[method]request-options.set-first-byte-timeout\x01W\x04\01[method]request-option\ -s.get-between-bytes-timeout\x01U\x04\01[method]request-options.set-between-bytes\ --timeout\x01W\x01@\x01\x04self\xd3\0\0=\x04\0\x1d[method]request-options.clone\x01\ -X\x01i#\x01o\x02\xd9\0\xc1\0\x01@\x03\x07headers6\x08contents8\x08trailers<\0\xda\ -\0\x04\0\x14[static]response.new\x01[\x01h#\x01@\x01\x04self\xdc\0\0\"\x04\0\x20\ -[method]response.get-status-code\x01]\x01@\x02\x04self\xdc\0\x0bstatus-code\"\0\xc6\ -\0\x04\0\x20[method]response.set-status-code\x01^\x01@\x01\x04self\xdc\0\06\x04\0\ -\x1c[method]response.get-headers\x01_\x01@\x02\x04this\xd9\0\x03res\xc1\0\0\xd0\0\ -\x04\0\x1d[static]response.consume-body\x01`\x03\0#wasi:http/types@0.3.0-rc-2026\ --02-09\x05\x07\x02\x03\0\x05\x07request\x02\x03\0\x05\x08response\x02\x03\0\x05\x0a\ -error-code\x01B\x0b\x02\x03\x02\x01\x08\x04\0\x07request\x03\0\0\x02\x03\x02\x01\ -\x09\x04\0\x08response\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\ -\x01i\x01\x01i\x03\x01j\x01\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x04s\ -end\x01\x09\x03\0$wasi:http/client@0.3.0-rc-2026-02-09\x05\x0b\x01B\x0c\x02\x03\x02\ -\x01\x06\x04\0\x08duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\ -\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\ -\x01\0\x04\0\x0await-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-\ -for\x01\x07\x03\0/wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09\x05\x0c\x01B\x08\ -\x02\x03\x02\x01\x06\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecon\ -dsy\x04\0\x07instant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\ -\0\x0eget-resolution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-02-09\x05\ -\x0d\x01B\x05\x01p}\x01@\x01\x03lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\ -\0w\x04\0\x0eget-random-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-02-09\ -\x05\x0e\x01B\x05\x01p}\x01@\x01\x03lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\ -\x01\x01@\0\0w\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecu\ -re@0.3.0-rc-2026-02-09\x05\x0f\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insec\ -ure-seed\x01\x01\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-02-09\x05\x10\x04\ -\0Ewasi:http/service-with-all-of-its-exports-removed@0.3.0-rc-2026-02-09\x04\0\x0b\ --\x01\0'service-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\x01\x0cp\ -rocessed-by\x02\x0dwit-component\x070.245.0\x10wit-bindgen-rust\x060.53.0"; +\0\x0einternal-error\x01\x06\0\x04\0\x0aerror-code\x03\0\x12\x01q\x05\x0einvalid\ +-syntax\0\0\x09forbidden\0\0\x09immutable\0\0\x0dsize-exceeded\0\0\x05other\x01\x06\ +\0\x04\0\x0cheader-error\x03\0\x14\x01q\x03\x0dnot-supported\0\0\x09immutable\0\0\ +\x05other\x01\x06\0\x04\0\x15request-options-error\x03\0\x16\x01s\x04\0\x0afield\ +-name\x03\0\x18\x01p}\x04\0\x0bfield-value\x03\0\x1a\x04\0\x06fields\x03\x01\x04\ +\0\x07headers\x03\0\x1c\x04\0\x08trailers\x03\0\x1c\x04\0\x07request\x03\x01\x04\ +\0\x0frequest-options\x03\x01\x01{\x04\0\x0bstatus-code\x03\0!\x04\0\x08response\ +\x03\x01\x01i\x1c\x01@\0\0$\x04\0\x13[constructor]fields\x01%\x01o\x02\x19\x1b\x01\ +p&\x01j\x01$\x01\x15\x01@\x01\x07entries'\0(\x04\0\x18[static]fields.from-list\x01\ +)\x01h\x1c\x01p\x1b\x01@\x02\x04self*\x04name\x19\0+\x04\0\x12[method]fields.get\ +\x01,\x01@\x02\x04self*\x04name\x19\0\x7f\x04\0\x12[method]fields.has\x01-\x01j\0\ +\x01\x15\x01@\x03\x04self*\x04name\x19\x05value+\0.\x04\0\x12[method]fields.set\x01\ +/\x01@\x02\x04self*\x04name\x19\0.\x04\0\x15[method]fields.delete\x010\x01j\x01+\ +\x01\x15\x01@\x02\x04self*\x04name\x19\01\x04\0\x1d[method]fields.get-and-delete\ +\x012\x01@\x03\x04self*\x04name\x19\x05value\x1b\0.\x04\0\x15[method]fields.appe\ +nd\x013\x01@\x01\x04self*\0'\x04\0\x17[method]fields.copy-all\x014\x01@\x01\x04s\ +elf*\0$\x04\0\x14[method]fields.clone\x015\x01i\x1d\x01f\x01}\x01k7\x01i\x1e\x01\ +k9\x01j\x01:\x01\x13\x01e\x01;\x01i\x20\x01k=\x01i\x1f\x01j\0\x01\x13\x01e\x01\xc0\ +\0\x01o\x02?\xc1\0\x01@\x04\x07headers6\x08contents8\x08trailers<\x07options>\0\xc2\ +\0\x04\0\x13[static]request.new\x01C\x01h\x1f\x01@\x01\x04self\xc4\0\0\x03\x04\0\ +\x1a[method]request.get-method\x01E\x01j\0\0\x01@\x02\x04self\xc4\0\x06method\x03\ +\0\xc6\0\x04\0\x1a[method]request.set-method\x01G\x01@\x01\x04self\xc4\0\0\x06\x04\ +\0#[method]request.get-path-with-query\x01H\x01@\x02\x04self\xc4\0\x0fpath-with-\ +query\x06\0\xc6\0\x04\0#[method]request.set-path-with-query\x01I\x01k\x05\x01@\x01\ +\x04self\xc4\0\0\xca\0\x04\0\x1a[method]request.get-scheme\x01K\x01@\x02\x04self\ +\xc4\0\x06scheme\xca\0\0\xc6\0\x04\0\x1a[method]request.set-scheme\x01L\x04\0\x1d\ +[method]request.get-authority\x01H\x01@\x02\x04self\xc4\0\x09authority\x06\0\xc6\ +\0\x04\0\x1d[method]request.set-authority\x01M\x01@\x01\x04self\xc4\0\0>\x04\0\x1b\ +[method]request.get-options\x01N\x01@\x01\x04self\xc4\0\06\x04\0\x1b[method]requ\ +est.get-headers\x01O\x01o\x027<\x01@\x02\x04this?\x03res\xc1\0\0\xd0\0\x04\0\x1c\ +[static]request.consume-body\x01Q\x01@\0\0=\x04\0\x1c[constructor]request-option\ +s\x01R\x01h\x20\x01k\x01\x01@\x01\x04self\xd3\0\0\xd4\0\x04\0+[method]request-op\ +tions.get-connect-timeout\x01U\x01j\0\x01\x17\x01@\x02\x04self\xd3\0\x08duration\ +\xd4\0\0\xd6\0\x04\0+[method]request-options.set-connect-timeout\x01W\x04\0.[met\ +hod]request-options.get-first-byte-timeout\x01U\x04\0.[method]request-options.se\ +t-first-byte-timeout\x01W\x04\01[method]request-options.get-between-bytes-timeou\ +t\x01U\x04\01[method]request-options.set-between-bytes-timeout\x01W\x01@\x01\x04\ +self\xd3\0\0=\x04\0\x1d[method]request-options.clone\x01X\x01i#\x01o\x02\xd9\0\xc1\ +\0\x01@\x03\x07headers6\x08contents8\x08trailers<\0\xda\0\x04\0\x14[static]respo\ +nse.new\x01[\x01h#\x01@\x01\x04self\xdc\0\0\"\x04\0\x20[method]response.get-stat\ +us-code\x01]\x01@\x02\x04self\xdc\0\x0bstatus-code\"\0\xc6\0\x04\0\x20[method]re\ +sponse.set-status-code\x01^\x01@\x01\x04self\xdc\0\06\x04\0\x1c[method]response.\ +get-headers\x01_\x01@\x02\x04this\xd9\0\x03res\xc1\0\0\xd0\0\x04\0\x1d[static]re\ +sponse.consume-body\x01`\x03\0#wasi:http/types@0.3.0-rc-2026-03-15\x05\x07\x02\x03\ +\0\x05\x07request\x02\x03\0\x05\x08response\x02\x03\0\x05\x0aerror-code\x01B\x0b\ +\x02\x03\x02\x01\x08\x04\0\x07request\x03\0\0\x02\x03\x02\x01\x09\x04\0\x08respo\ +nse\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\x01i\x01\x01i\x03\ +\x01j\x01\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x04send\x01\x09\x03\0$\ +wasi:http/client@0.3.0-rc-2026-03-15\x05\x0b\x01B\x0c\x02\x03\x02\x01\x06\x04\0\x08\ +duration\x03\0\0\x01w\x04\0\x04mark\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01\ +@\0\0\x01\x04\0\x0eget-resolution\x01\x05\x01C\x01\x04when\x03\x01\0\x04\0\x0awa\ +it-until\x01\x06\x01C\x01\x08how-long\x01\x01\0\x04\0\x08wait-for\x01\x07\x03\0/\ +wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15\x05\x0c\x01B\x08\x02\x03\x02\x01\ +\x06\x04\0\x08duration\x03\0\0\x01r\x02\x07secondsx\x0bnanosecondsy\x04\0\x07ins\ +tant\x03\0\x02\x01@\0\0\x03\x04\0\x03now\x01\x04\x01@\0\0\x01\x04\0\x0eget-resol\ +ution\x01\x05\x03\0,wasi:clocks/system-clock@0.3.0-rc-2026-03-15\x05\x0d\x01B\x05\ +\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x10get-random-bytes\x01\x01\x01@\0\0w\x04\0\ +\x0eget-random-u64\x01\x02\x03\0&wasi:random/random@0.3.0-rc-2026-03-15\x05\x0e\x01\ +B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\x01\ +@\0\0w\x04\0\x17get-insecure-random-u64\x01\x02\x03\0(wasi:random/insecure@0.3.0\ +-rc-2026-03-15\x05\x0f\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\ +\x01\x01\x03\0-wasi:random/insecure-seed@0.3.0-rc-2026-03-15\x05\x10\x04\0Ewasi:\ +http/service-with-all-of-its-exports-removed@0.3.0-rc-2026-03-15\x04\0\x0b-\x01\0\ +'service-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\x01\x0cprocesse\ +d-by\x02\x0dwit-component\x070.245.1\x10wit-bindgen-rust\x060.54.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() { diff --git a/crates/wasip3/wit/deps/cli.wit b/crates/wasip3/wit/deps/cli.wit index 4f8bbf8..8ba52c5 100644 --- a/crates/wasip3/wit/deps/cli.wit +++ b/crates/wasip3/wit/deps/cli.wit @@ -1,6 +1,6 @@ -package wasi:cli@0.3.0-rc-2026-02-09; +package wasi:cli@0.3.0-rc-2026-03-15; -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface environment { /// Get the POSIX-style environment variables. /// @@ -10,23 +10,23 @@ interface environment { /// Morally, these are a value import, but until value imports are available /// in the component model, this import function should return the same /// values each time it is called. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-environment: func() -> list>; /// Get the POSIX-style arguments to the program. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-arguments: func() -> list; /// Return a path that programs should use as their initial current working /// directory, interpreting `.` as shorthand for this. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-initial-cwd: func() -> option; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface exit { /// Exit the current instance and any linked instances. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) exit: func(status: result); /// Exit the current instance and any linked instances, reporting the @@ -41,16 +41,16 @@ interface exit { exit-with-code: func(status-code: u8); } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface run { /// Run the program. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) run: async func() -> result; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface types { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) enum error-code { /// Input/output error io, @@ -61,7 +61,7 @@ interface types { } } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface stdin { use types.{error-code}; @@ -78,11 +78,11 @@ interface stdin { /// /// Multiple streams may be active at the same time. The behavior of concurrent /// reads is implementation-specific. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) read-via-stream: func() -> tuple, future>>; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface stdout { use types.{error-code}; @@ -94,11 +94,11 @@ interface stdout { /// /// Otherwise if there is an error the readable end of the stream will be /// dropped and this function will return an error-code. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) write-via-stream: func(data: stream) -> future>; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface stderr { use types.{error-code}; @@ -110,7 +110,7 @@ interface stderr { /// /// Otherwise if there is an error the readable end of the stream will be /// dropped and this function will return an error-code. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) write-via-stream: func(data: stream) -> future>; } @@ -119,10 +119,10 @@ interface stderr { /// In the future, this may include functions for disabling echoing, /// disabling input buffering so that keyboard events are sent through /// immediately, querying supported features, and so on. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface terminal-input { /// The input side of a terminal. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource terminal-input; } @@ -131,126 +131,126 @@ interface terminal-input { /// In the future, this may include functions for querying the terminal /// size, being notified of terminal size changes, querying supported /// features, and so on. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface terminal-output { /// The output side of a terminal. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource terminal-output; } /// An interface providing an optional `terminal-input` for stdin as a /// link-time authority. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface terminal-stdin { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) use terminal-input.{terminal-input}; /// If stdin is connected to a terminal, return a `terminal-input` handle /// allowing further interaction with it. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-terminal-stdin: func() -> option; } /// An interface providing an optional `terminal-output` for stdout as a /// link-time authority. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface terminal-stdout { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) use terminal-output.{terminal-output}; /// If stdout is connected to a terminal, return a `terminal-output` handle /// allowing further interaction with it. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-terminal-stdout: func() -> option; } /// An interface providing an optional `terminal-output` for stderr as a /// link-time authority. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface terminal-stderr { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) use terminal-output.{terminal-output}; /// If stderr is connected to a terminal, return a `terminal-output` handle /// allowing further interaction with it. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-terminal-stderr: func() -> option; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world imports { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import environment; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import exit; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import types; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import stdin; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import stdout; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import stderr; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-input; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-output; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-stdin; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-stdout; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-stderr; - import wasi:clocks/types@0.3.0-rc-2026-02-09; - import wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09; - import wasi:clocks/system-clock@0.3.0-rc-2026-02-09; + import wasi:clocks/types@0.3.0-rc-2026-03-15; + import wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15; + import wasi:clocks/system-clock@0.3.0-rc-2026-03-15; @unstable(feature = clocks-timezone) - import wasi:clocks/timezone@0.3.0-rc-2026-02-09; - import wasi:filesystem/types@0.3.0-rc-2026-02-09; - import wasi:filesystem/preopens@0.3.0-rc-2026-02-09; - import wasi:sockets/types@0.3.0-rc-2026-02-09; - import wasi:sockets/ip-name-lookup@0.3.0-rc-2026-02-09; - import wasi:random/random@0.3.0-rc-2026-02-09; - import wasi:random/insecure@0.3.0-rc-2026-02-09; - import wasi:random/insecure-seed@0.3.0-rc-2026-02-09; + import wasi:clocks/timezone@0.3.0-rc-2026-03-15; + import wasi:filesystem/types@0.3.0-rc-2026-03-15; + import wasi:filesystem/preopens@0.3.0-rc-2026-03-15; + import wasi:sockets/types@0.3.0-rc-2026-03-15; + import wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15; + import wasi:random/random@0.3.0-rc-2026-03-15; + import wasi:random/insecure@0.3.0-rc-2026-03-15; + import wasi:random/insecure-seed@0.3.0-rc-2026-03-15; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world command { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import environment; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import exit; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import types; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import stdin; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import stdout; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import stderr; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-input; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-output; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-stdin; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-stdout; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import terminal-stderr; - import wasi:clocks/types@0.3.0-rc-2026-02-09; - import wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09; - import wasi:clocks/system-clock@0.3.0-rc-2026-02-09; + import wasi:clocks/types@0.3.0-rc-2026-03-15; + import wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15; + import wasi:clocks/system-clock@0.3.0-rc-2026-03-15; @unstable(feature = clocks-timezone) - import wasi:clocks/timezone@0.3.0-rc-2026-02-09; - import wasi:filesystem/types@0.3.0-rc-2026-02-09; - import wasi:filesystem/preopens@0.3.0-rc-2026-02-09; - import wasi:sockets/types@0.3.0-rc-2026-02-09; - import wasi:sockets/ip-name-lookup@0.3.0-rc-2026-02-09; - import wasi:random/random@0.3.0-rc-2026-02-09; - import wasi:random/insecure@0.3.0-rc-2026-02-09; - import wasi:random/insecure-seed@0.3.0-rc-2026-02-09; + import wasi:clocks/timezone@0.3.0-rc-2026-03-15; + import wasi:filesystem/types@0.3.0-rc-2026-03-15; + import wasi:filesystem/preopens@0.3.0-rc-2026-03-15; + import wasi:sockets/types@0.3.0-rc-2026-03-15; + import wasi:sockets/ip-name-lookup@0.3.0-rc-2026-03-15; + import wasi:random/random@0.3.0-rc-2026-03-15; + import wasi:random/insecure@0.3.0-rc-2026-03-15; + import wasi:random/insecure-seed@0.3.0-rc-2026-03-15; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) export run; } diff --git a/crates/wasip3/wit/deps/clocks.wit b/crates/wasip3/wit/deps/clocks.wit index 71986ba..19fc4bc 100644 --- a/crates/wasip3/wit/deps/clocks.wit +++ b/crates/wasip3/wit/deps/clocks.wit @@ -1,10 +1,10 @@ -package wasi:clocks@0.3.0-rc-2026-02-09; +package wasi:clocks@0.3.0-rc-2026-03-15; /// This interface common types used throughout wasi:clocks. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface types { /// A duration of time, in nanoseconds. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type duration = u64; } @@ -16,14 +16,14 @@ interface types { /// /// A monotonic clock is a clock which has an unspecified initial value, and /// successive reads of the clock will produce non-decreasing values. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface monotonic-clock { use types.{duration}; /// A mark on a monotonic clock is a number of nanoseconds since an /// unspecified initial value, and can only be compared to instances from /// the same monotonic-clock. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type mark = u64; /// Read the current value of the clock. @@ -35,20 +35,20 @@ interface monotonic-clock { /// the value of the clock in a `mark`. Consequently, implementations /// should ensure that the starting time is low enough to avoid the /// possibility of overflow in practice. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) now: func() -> mark; /// Query the resolution of the clock. Returns the duration of time /// corresponding to a clock tick. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-resolution: func() -> duration; /// Wait until the specified mark has occurred. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) wait-until: async func(when: mark); /// Wait for the specified duration to elapse. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) wait-for: async func(how-long: duration); } @@ -62,7 +62,7 @@ interface monotonic-clock { /// monotonic, making it unsuitable for measuring elapsed time. /// /// It is intended for reporting the current date and time for humans. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface system-clock { use types.{duration}; @@ -82,7 +82,7 @@ interface system-clock { /// /// [POSIX's Seconds Since the Epoch]: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html#tag_21_04_16 /// [Unix Time]: https://en.wikipedia.org/wiki/Unix_time - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record instant { seconds: s64, nanoseconds: u32, @@ -94,12 +94,12 @@ interface system-clock { /// will not necessarily produce a sequence of non-decreasing values. /// /// The nanoseconds field of the output is always less than 1000000000. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) now: func() -> instant; /// Query the resolution of the clock. Returns the smallest duration of time /// that the implementation permits distinguishing. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-resolution: func() -> duration; } @@ -148,13 +148,13 @@ interface timezone { to-debug-string: func() -> string; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world imports { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import types; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import monotonic-clock; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import system-clock; @unstable(feature = clocks-timezone) import timezone; diff --git a/crates/wasip3/wit/deps/filesystem.wit b/crates/wasip3/wit/deps/filesystem.wit index 8fb8304..697681f 100644 --- a/crates/wasip3/wit/deps/filesystem.wit +++ b/crates/wasip3/wit/deps/filesystem.wit @@ -1,4 +1,4 @@ -package wasi:filesystem@0.3.0-rc-2026-02-09; +package wasi:filesystem@0.3.0-rc-2026-03-15; /// WASI filesystem is a filesystem API primarily intended to let users run WASI /// programs that access their files on their existing filesystems, without @@ -35,23 +35,20 @@ package wasi:filesystem@0.3.0-rc-2026-02-09; /// store or a database instead. /// /// [WASI filesystem path resolution]: https://github.com/WebAssembly/wasi-filesystem/blob/main/path-resolution.md -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface types { - @since(version = 0.3.0-rc-2026-02-09) - use wasi:clocks/system-clock@0.3.0-rc-2026-02-09.{instant}; + @since(version = 0.3.0-rc-2026-03-15) + use wasi:clocks/system-clock@0.3.0-rc-2026-03-15.{instant}; /// File size or length of a region within a file. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type filesize = u64; /// The type of a filesystem object referenced by a descriptor. /// /// Note: This was called `filetype` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) - enum descriptor-type { - /// The type of the descriptor or file is unknown or is different from - /// any of the other types specified. - unknown, + @since(version = 0.3.0-rc-2026-03-15) + variant descriptor-type { /// The descriptor refers to a block device inode. block-device, /// The descriptor refers to a character device inode. @@ -66,12 +63,15 @@ interface types { regular-file, /// The descriptor refers to a socket. socket, + /// The type of the descriptor or file is different from any of the + /// other types specified. + other(option), } /// Descriptor flags. /// /// Note: This was called `fdflags` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) flags descriptor-flags { /// Read mode: Data can be read. read, @@ -113,7 +113,7 @@ interface types { } /// Flags determining the method of how paths are resolved. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) flags path-flags { /// As long as the resolved path corresponds to a symbolic link, it is /// expanded. @@ -121,7 +121,7 @@ interface types { } /// Open flags used by `open-at`. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) flags open-flags { /// Create file if it does not exist, similar to `O_CREAT` in POSIX. create, @@ -134,13 +134,13 @@ interface types { } /// Number of hard links to an inode. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type link-count = u64; /// File attributes. /// /// Note: This was called `filestat` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record descriptor-stat { /// File type. %type: descriptor-type, @@ -167,7 +167,7 @@ interface types { } /// When setting a timestamp, this gives the value to set it to. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant new-timestamp { /// Leave the timestamp set to its previous value. no-change, @@ -179,7 +179,7 @@ interface types { } /// A directory entry. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record directory-entry { /// The type of the file referred to by this directory entry. %type: descriptor-type, @@ -191,8 +191,8 @@ interface types { /// Not all of these error codes are returned by the functions provided by this /// API; some are used in higher-level library layers, and others are provided /// merely for alignment with POSIX. - @since(version = 0.3.0-rc-2026-02-09) - enum error-code { + @since(version = 0.3.0-rc-2026-03-15) + variant error-code { /// Permission denied, similar to `EACCES` in POSIX. access, /// Connection already in progress, similar to `EALREADY` in POSIX. @@ -265,10 +265,14 @@ interface types { text-file-busy, /// Cross-device link, similar to `EXDEV` in POSIX. cross-device, + /// A catch-all for errors not captured by the existing variants. + /// Implementations can use this to extend the error type without + /// breaking existing code. + other(option), } /// File or memory access pattern advisory information. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) enum advice { /// The application has no advice to give on its behavior with respect /// to the specified data. @@ -292,7 +296,7 @@ interface types { /// A 128-bit hash value, split into parts because wasm doesn't have a /// 128-bit integer type. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record metadata-hash-value { /// 64 bits of a 128-bit hash value. lower: u64, @@ -303,7 +307,7 @@ interface types { /// A descriptor is a reference to a filesystem object, which may be a file, /// directory, named pipe, special file, or other object on which filesystem /// calls may be made. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource descriptor { /// Return a stream for reading from a file. /// @@ -321,7 +325,7 @@ interface types { /// resolves to `err` with an `error-code`. /// /// Note: This is similar to `pread` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) read-via-stream: func(offset: filesize) -> tuple, future>>; /// Return a stream for writing to a file, if available. /// @@ -335,7 +339,7 @@ interface types { /// written or an error is encountered. /// /// Note: This is similar to `pwrite` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) write-via-stream: func(data: stream, offset: filesize) -> future>; /// Return a stream for appending to a file, if available. /// @@ -345,12 +349,12 @@ interface types { /// written or an error is encountered. /// /// Note: This is similar to `write` with `O_APPEND` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) append-via-stream: func(data: stream) -> future>; /// Provide file advisory information on a descriptor. /// /// This is similar to `posix_fadvise` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) advise: async func(offset: filesize, length: filesize, advice: advice) -> result<_, error-code>; /// Synchronize the data of a file to disk. /// @@ -358,7 +362,7 @@ interface types { /// opened for writing. /// /// Note: This is similar to `fdatasync` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) sync-data: async func() -> result<_, error-code>; /// Get flags associated with a descriptor. /// @@ -366,7 +370,7 @@ interface types { /// /// Note: This returns the value that was the `fs_flags` value returned /// from `fdstat_get` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-flags: async func() -> result; /// Get the dynamic type of a descriptor. /// @@ -378,20 +382,20 @@ interface types { /// /// Note: This returns the value that was the `fs_filetype` value returned /// from `fdstat_get` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-type: async func() -> result; /// Adjust the size of an open file. If this increases the file's size, the /// extra bytes are filled with zeros. /// /// Note: This was called `fd_filestat_set_size` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-size: async func(size: filesize) -> result<_, error-code>; /// Adjust the timestamps of an open file or directory. /// /// Note: This is similar to `futimens` in POSIX. /// /// Note: This was called `fd_filestat_set_times` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-times: async func(data-access-timestamp: new-timestamp, data-modification-timestamp: new-timestamp) -> result<_, error-code>; /// Read directory entries from a directory. /// @@ -405,7 +409,7 @@ interface types { /// /// This function returns a future, which will resolve to an error code if /// reading full contents of the directory fails. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) read-directory: func() -> tuple, future>>; /// Synchronize the data and metadata of a file to disk. /// @@ -413,12 +417,12 @@ interface types { /// opened for writing. /// /// Note: This is similar to `fsync` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) sync: async func() -> result<_, error-code>; /// Create a directory. /// /// Note: This is similar to `mkdirat` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) create-directory-at: async func(path: string) -> result<_, error-code>; /// Return the attributes of an open file or directory. /// @@ -429,7 +433,7 @@ interface types { /// modified, use `metadata-hash`. /// /// Note: This was called `fd_filestat_get` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) stat: async func() -> result; /// Return the attributes of a file or directory. /// @@ -438,7 +442,7 @@ interface types { /// discussion of alternatives. /// /// Note: This was called `path_filestat_get` in earlier versions of WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) stat-at: async func(path-flags: path-flags, path: string) -> result; /// Adjust the timestamps of a file or directory. /// @@ -446,7 +450,7 @@ interface types { /// /// Note: This was called `path_filestat_set_times` in earlier versions of /// WASI. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-times-at: async func(path-flags: path-flags, path: string, data-access-timestamp: new-timestamp, data-modification-timestamp: new-timestamp) -> result<_, error-code>; /// Create a hard link. /// @@ -455,7 +459,7 @@ interface types { /// `error-code::not-permitted` if the old path is not a file. /// /// Note: This is similar to `linkat` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) link-at: async func(old-path-flags: path-flags, old-path: string, new-descriptor: borrow, new-path: string) -> result<_, error-code>; /// Open a file or directory. /// @@ -469,7 +473,7 @@ interface types { /// `error-code::read-only`. /// /// Note: This is similar to `openat` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) open-at: async func(path-flags: path-flags, path: string, open-flags: open-flags, %flags: descriptor-flags) -> result; /// Read the contents of a symbolic link. /// @@ -477,19 +481,19 @@ interface types { /// filesystem, this function fails with `error-code::not-permitted`. /// /// Note: This is similar to `readlinkat` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) readlink-at: async func(path: string) -> result; /// Remove a directory. /// /// Return `error-code::not-empty` if the directory is not empty. /// /// Note: This is similar to `unlinkat(fd, path, AT_REMOVEDIR)` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) remove-directory-at: async func(path: string) -> result<_, error-code>; /// Rename a filesystem object. /// /// Note: This is similar to `renameat` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) rename-at: async func(old-path: string, new-descriptor: borrow, new-path: string) -> result<_, error-code>; /// Create a symbolic link (also known as a "symlink"). /// @@ -497,13 +501,18 @@ interface types { /// `error-code::not-permitted`. /// /// Note: This is similar to `symlinkat` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) symlink-at: async func(old-path: string, new-path: string) -> result<_, error-code>; /// Unlink a filesystem object that is not a directory. /// - /// Return `error-code::is-directory` if the path refers to a directory. - /// Note: This is similar to `unlinkat(fd, path, 0)` in POSIX. - @since(version = 0.3.0-rc-2026-02-09) + /// This is similar to `unlinkat(fd, path, 0)` in POSIX. + /// + /// Error returns are as specified by POSIX. + /// + /// If the filesystem object is a directory, `error-code::access` or + /// `error-code::is-directory` may be returned instead of the + /// POSIX-specified `error-code::not-permitted`. + @since(version = 0.3.0-rc-2026-03-15) unlink-file-at: async func(path: string) -> result<_, error-code>; /// Test whether two descriptors refer to the same filesystem object. /// @@ -511,7 +520,7 @@ interface types { /// same device (`st_dev`) and inode (`st_ino` or `d_ino`) numbers. /// wasi-filesystem does not expose device and inode numbers, so this function /// may be used instead. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) is-same-object: async func(other: borrow) -> bool; /// Return a hash of the metadata associated with a filesystem object referred /// to by a descriptor. @@ -532,35 +541,35 @@ interface types { /// computed hash. /// /// However, none of these is required. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) metadata-hash: async func() -> result; /// Return a hash of the metadata associated with a filesystem object referred /// to by a directory descriptor and a relative path. /// /// This performs the same hash computation as `metadata-hash`. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) metadata-hash-at: async func(path-flags: path-flags, path: string) -> result; } } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface preopens { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) use types.{descriptor}; /// Return the set of preopened directories, and their paths. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-directories: func() -> list>; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world imports { - @since(version = 0.3.0-rc-2026-02-09) - import wasi:clocks/types@0.3.0-rc-2026-02-09; - @since(version = 0.3.0-rc-2026-02-09) - import wasi:clocks/system-clock@0.3.0-rc-2026-02-09; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) + import wasi:clocks/types@0.3.0-rc-2026-03-15; + @since(version = 0.3.0-rc-2026-03-15) + import wasi:clocks/system-clock@0.3.0-rc-2026-03-15; + @since(version = 0.3.0-rc-2026-03-15) import types; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import preopens; } diff --git a/crates/wasip3/wit/deps/http.wit b/crates/wasip3/wit/deps/http.wit index 442b18e..c1c1e68 100644 --- a/crates/wasip3/wit/deps/http.wit +++ b/crates/wasip3/wit/deps/http.wit @@ -1,13 +1,13 @@ -package wasi:http@0.3.0-rc-2026-02-09; +package wasi:http@0.3.0-rc-2026-03-15; /// This interface defines all of the types and methods for implementing HTTP /// Requests and Responses, as well as their headers, trailers, and bodies. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface types { - use wasi:clocks/types@0.3.0-rc-2026-02-09.{duration}; + use wasi:clocks/types@0.3.0-rc-2026-03-15.{duration}; /// This type corresponds to HTTP standard Methods. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant method { get, head, @@ -22,7 +22,7 @@ interface types { } /// This type corresponds to HTTP standard Related Schemes. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant scheme { HTTP, HTTPS, @@ -30,21 +30,21 @@ interface types { } /// Defines the case payload type for `DNS-error` above: - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record DNS-error-payload { rcode: option, info-code: option, } /// Defines the case payload type for `TLS-alert-received` above: - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record TLS-alert-received-payload { alert-id: option, alert-message: option, } /// Defines the case payload type for `HTTP-response-{header,trailer}-size` above: - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record field-size-payload { field-name: option, field-size: option, @@ -52,7 +52,7 @@ interface types { /// These cases are inspired by the IANA HTTP Proxy Error Types: /// - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant error-code { DNS-timeout, DNS-error(DNS-error-payload), @@ -102,7 +102,7 @@ interface types { /// This type enumerates the different kinds of errors that may occur when /// setting or appending to a `fields` resource. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant header-error { /// This error indicates that a `field-name` or `field-value` was /// syntactically invalid when used with an operation that sets headers in a @@ -114,30 +114,49 @@ interface types { /// This error indicates that the operation on the `fields` was not /// permitted because the fields are immutable. immutable, + /// This error indicates that the operation would exceed an + /// implementation-defined limit on field sizes. This may apply to + /// an individual `field-value`, a single `field-name` plus all its + /// values, or the total aggregate size of all fields. + size-exceeded, + /// This is a catch-all error for anything that doesn't fit cleanly into a + /// more specific case. Implementations can use this to extend the error + /// type without breaking existing code. It also includes an optional + /// string for an unstructured description of the error. Users should not + /// depend on the string for diagnosing errors, as it's not required to be + /// consistent between implementations. + other(option), } /// This type enumerates the different kinds of errors that may occur when /// setting fields of a `request-options` resource. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant request-options-error { /// Indicates the specified field is not supported by this implementation. not-supported, /// Indicates that the operation on the `request-options` was not permitted /// because it is immutable. immutable, + /// This is a catch-all error for anything that doesn't fit cleanly into a + /// more specific case. Implementations can use this to extend the error + /// type without breaking existing code. It also includes an optional + /// string for an unstructured description of the error. Users should not + /// depend on the string for diagnosing errors, as it's not required to be + /// consistent between implementations. + other(option), } /// Field names are always strings. /// /// Field names should always be treated as case insensitive by the `fields` /// resource for the purposes of equality checking. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type field-name = string; /// Field values should always be ASCII strings. However, in /// reality, HTTP implementations often have to interpret malformed values, /// so they are provided as a list of bytes. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type field-value = list; /// This following block defines the `fields` resource which corresponds to @@ -155,7 +174,11 @@ interface types { /// original casing used to construct or mutate the `fields` resource. The `fields` /// resource should use that original casing when serializing the fields for /// transport or when returning them from a method. - @since(version = 0.3.0-rc-2026-02-09) + /// + /// Implementations may impose limits on individual field values and on total + /// aggregate field section size. Operations that would exceed these limits + /// fail with `header-error.size-exceeded` + @since(version = 0.3.0-rc-2026-03-15) resource fields { /// Construct an empty HTTP Fields. /// @@ -175,7 +198,8 @@ interface types { /// well-formed, so they are represented as a raw list of bytes. /// /// An error result will be returned if any header or value was - /// syntactically invalid, or if a header was forbidden. + /// syntactically invalid, if a header was forbidden, or if the + /// entries would exceed an implementation size limit. from-list: static func(entries: list>) -> result; /// Get all of the values corresponding to a name. If the name is not present /// in this `fields`, an empty list is returned. However, if the name is @@ -189,6 +213,9 @@ interface types { /// name, if they have been set. /// /// Fails with `header-error.immutable` if the `fields` are immutable. + /// + /// Fails with `header-error.size-exceeded` if the name or values would + /// exceed an implementation-defined size limit. set: func(name: field-name, value: list) -> result<_, header-error>; /// Delete all values for a name. Does nothing if no values for the name /// exist. @@ -206,6 +233,9 @@ interface types { /// values for that name. /// /// Fails with `header-error.immutable` if the `fields` are immutable. + /// + /// Fails with `header-error.size-exceeded` if the value would exceed + /// an implementation-defined size limit. append: func(name: field-name, value: field-value) -> result<_, header-error>; /// Retrieve the full set of names and values in the Fields. Like the /// constructor, the list represents each name-value pair. @@ -224,15 +254,15 @@ interface types { } /// Headers is an alias for Fields. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type headers = fields; /// Trailers is an alias for Fields. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type trailers = fields; /// Represents an HTTP Request. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource request { /// Construct a new `request` with a default `method` of `GET`, and /// `none` values for `path-with-query`, `scheme`, and `authority`. @@ -319,7 +349,7 @@ interface types { /// /// These timeouts are separate from any the user may use to bound an /// asynchronous call. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource request-options { /// Construct a default `request-options` value. constructor(); @@ -348,11 +378,11 @@ interface types { } /// This type corresponds to the HTTP standard Status Code. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type status-code = u16; /// Represents an HTTP Response. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource response { /// Construct a new `response`, with a default `status-code` of `200`. /// If a different `status-code` is needed, it must be set via the @@ -401,7 +431,7 @@ interface types { /// /// In `wasi:http/middleware` this interface is both exported and imported as /// the "downstream" and "upstream" directions of the middleware chain. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface handler { use types.{request, response, error-code}; @@ -420,7 +450,7 @@ interface handler { /// (including WIT itself) is unable to represent a component importing two /// instances of the same interface. A `client.send` import may be linked /// directly to a `handler.handle` export to bypass the network. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface client { use types.{request, response, error-code}; @@ -432,22 +462,22 @@ interface client { /// The `wasi:http/service` world captures a broad category of HTTP services /// including web applications, API servers, and proxies. It may be `include`d /// in more specific worlds such as `wasi:http/middleware`. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world service { - import wasi:cli/types@0.3.0-rc-2026-02-09; - import wasi:cli/stdout@0.3.0-rc-2026-02-09; - import wasi:cli/stderr@0.3.0-rc-2026-02-09; - import wasi:cli/stdin@0.3.0-rc-2026-02-09; - import wasi:clocks/types@0.3.0-rc-2026-02-09; + import wasi:cli/types@0.3.0-rc-2026-03-15; + import wasi:cli/stdout@0.3.0-rc-2026-03-15; + import wasi:cli/stderr@0.3.0-rc-2026-03-15; + import wasi:cli/stdin@0.3.0-rc-2026-03-15; + import wasi:clocks/types@0.3.0-rc-2026-03-15; import types; import client; - import wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09; - import wasi:clocks/system-clock@0.3.0-rc-2026-02-09; + import wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15; + import wasi:clocks/system-clock@0.3.0-rc-2026-03-15; @unstable(feature = clocks-timezone) - import wasi:clocks/timezone@0.3.0-rc-2026-02-09; - import wasi:random/random@0.3.0-rc-2026-02-09; - import wasi:random/insecure@0.3.0-rc-2026-02-09; - import wasi:random/insecure-seed@0.3.0-rc-2026-02-09; + import wasi:clocks/timezone@0.3.0-rc-2026-03-15; + import wasi:random/random@0.3.0-rc-2026-03-15; + import wasi:random/insecure@0.3.0-rc-2026-03-15; + import wasi:random/insecure-seed@0.3.0-rc-2026-03-15; export handler; } @@ -457,23 +487,23 @@ world service { /// Components may implement this world to allow them to participate in handler /// "chains" where a `request` flows through handlers on its way to some terminal /// `service` and corresponding `response` flows in the opposite direction. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world middleware { - import wasi:clocks/types@0.3.0-rc-2026-02-09; + import wasi:clocks/types@0.3.0-rc-2026-03-15; import types; import handler; - import wasi:cli/types@0.3.0-rc-2026-02-09; - import wasi:cli/stdout@0.3.0-rc-2026-02-09; - import wasi:cli/stderr@0.3.0-rc-2026-02-09; - import wasi:cli/stdin@0.3.0-rc-2026-02-09; + import wasi:cli/types@0.3.0-rc-2026-03-15; + import wasi:cli/stdout@0.3.0-rc-2026-03-15; + import wasi:cli/stderr@0.3.0-rc-2026-03-15; + import wasi:cli/stdin@0.3.0-rc-2026-03-15; import client; - import wasi:clocks/monotonic-clock@0.3.0-rc-2026-02-09; - import wasi:clocks/system-clock@0.3.0-rc-2026-02-09; + import wasi:clocks/monotonic-clock@0.3.0-rc-2026-03-15; + import wasi:clocks/system-clock@0.3.0-rc-2026-03-15; @unstable(feature = clocks-timezone) - import wasi:clocks/timezone@0.3.0-rc-2026-02-09; - import wasi:random/random@0.3.0-rc-2026-02-09; - import wasi:random/insecure@0.3.0-rc-2026-02-09; - import wasi:random/insecure-seed@0.3.0-rc-2026-02-09; + import wasi:clocks/timezone@0.3.0-rc-2026-03-15; + import wasi:random/random@0.3.0-rc-2026-03-15; + import wasi:random/insecure@0.3.0-rc-2026-03-15; + import wasi:random/insecure-seed@0.3.0-rc-2026-03-15; export handler; } diff --git a/crates/wasip3/wit/deps/random.wit b/crates/wasip3/wit/deps/random.wit index 521df6e..026f44a 100644 --- a/crates/wasip3/wit/deps/random.wit +++ b/crates/wasip3/wit/deps/random.wit @@ -1,10 +1,10 @@ -package wasi:random@0.3.0-rc-2026-02-09; +package wasi:random@0.3.0-rc-2026-03-15; /// The insecure-seed interface for seeding hash-map DoS resistance. /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface insecure-seed { /// Return a 128-bit value that may contain a pseudo-random value. /// @@ -23,7 +23,7 @@ interface insecure-seed { /// This will likely be changed to a value import, to prevent it from being /// called multiple times and potentially used for purposes other than DoS /// protection. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-insecure-seed: func() -> tuple; } @@ -31,9 +31,9 @@ interface insecure-seed { /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface insecure { - /// Return `len` insecure pseudo-random bytes. + /// Return up to `max-len` insecure pseudo-random bytes. /// /// This function is not cryptographically secure. Do not use it for /// anything related to security. @@ -41,14 +41,21 @@ interface insecure { /// There are no requirements on the values of the returned bytes, however /// implementations are encouraged to return evenly distributed values with /// a long period. - @since(version = 0.3.0-rc-2026-02-09) - get-insecure-random-bytes: func(len: u64) -> list; + /// + /// Implementations MAY return fewer bytes than requested (a short read). + /// Callers that require exactly `max-len` bytes MUST call this function in + /// a loop until the desired number of bytes has been accumulated. + /// Implementations MUST return at least 1 byte when `max-len` is greater + /// than zero. When `max-len` is zero, implementations MUST return an empty + /// list without trapping. + @since(version = 0.3.0-rc-2026-03-15) + get-insecure-random-bytes: func(max-len: u64) -> list; /// Return an insecure pseudo-random `u64` value. /// /// This function returns the same type of pseudo-random data as /// `get-insecure-random-bytes`, represented as a `u64`. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-insecure-random-u64: func() -> u64; } @@ -56,9 +63,10 @@ interface insecure { /// /// It is intended to be portable at least between Unix-family platforms and /// Windows. -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface random { - /// Return `len` cryptographically-secure random or pseudo-random bytes. + /// Return up to `max-len` cryptographically-secure random or pseudo-random + /// bytes. /// /// This function must produce data at least as cryptographically secure and /// fast as an adequately seeded cryptographically-secure pseudo-random @@ -67,26 +75,33 @@ interface random { /// request and on requests for numbers of bytes. The returned data must /// always be unpredictable. /// + /// Implementations MAY return fewer bytes than requested (a short read). + /// Callers that require exactly `max-len` bytes MUST call this function in + /// a loop until the desired number of bytes has been accumulated. + /// Implementations MUST return at least 1 byte when `max-len` is greater + /// than zero. When `max-len` is zero, implementations MUST return an empty + /// list without trapping. + /// /// This function must always return fresh data. Deterministic environments /// must omit this function, rather than implementing it with deterministic /// data. - @since(version = 0.3.0-rc-2026-02-09) - get-random-bytes: func(len: u64) -> list; + @since(version = 0.3.0-rc-2026-03-15) + get-random-bytes: func(max-len: u64) -> list; /// Return a cryptographically-secure random or pseudo-random `u64` value. /// /// This function returns the same type of data as `get-random-bytes`, /// represented as a `u64`. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-random-u64: func() -> u64; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world imports { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import random; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import insecure; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import insecure-seed; } diff --git a/crates/wasip3/wit/deps/sockets.wit b/crates/wasip3/wit/deps/sockets.wit index aa9d4d7..cde2e4d 100644 --- a/crates/wasip3/wit/deps/sockets.wit +++ b/crates/wasip3/wit/deps/sockets.wit @@ -1,63 +1,86 @@ -package wasi:sockets@0.3.0-rc-2026-02-09; +package wasi:sockets@0.3.0-rc-2026-03-15; -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface types { - @since(version = 0.3.0-rc-2026-02-09) - use wasi:clocks/types@0.3.0-rc-2026-02-09.{duration}; + @since(version = 0.3.0-rc-2026-03-15) + use wasi:clocks/types@0.3.0-rc-2026-03-15.{duration}; /// Error codes. /// /// In theory, every API can return any error code. /// In practice, API's typically only return the errors documented per API /// combined with a couple of errors that are always possible: - /// - `unknown` + /// - `other` /// - `access-denied` /// - `not-supported` /// - `out-of-memory` /// /// See each individual API for what the POSIX equivalents are. They sometimes differ per API. - @since(version = 0.3.0-rc-2026-02-09) - enum error-code { - /// Unknown error - unknown, + @since(version = 0.3.0-rc-2026-03-15) + variant error-code { /// Access denied. /// /// POSIX equivalent: EACCES, EPERM access-denied, /// The operation is not supported. /// - /// POSIX equivalent: EOPNOTSUPP + /// POSIX equivalent: EOPNOTSUPP, ENOPROTOOPT, EPFNOSUPPORT, EPROTONOSUPPORT, ESOCKTNOSUPPORT not-supported, /// One of the arguments is invalid. /// - /// POSIX equivalent: EINVAL + /// POSIX equivalent: EINVAL, EDESTADDRREQ, EAFNOSUPPORT invalid-argument, /// Not enough memory to complete the operation. /// - /// POSIX equivalent: ENOMEM, ENOBUFS, EAI_MEMORY + /// POSIX equivalent: ENOMEM, ENOBUFS out-of-memory, /// The operation timed out before it could finish completely. + /// + /// POSIX equivalent: ETIMEDOUT timeout, /// The operation is not valid in the socket's current state. invalid-state, - /// A bind operation failed because the provided address is not an address that the `network` can bind to. + /// The local address is not available. + /// + /// POSIX equivalent: EADDRNOTAVAIL address-not-bindable, - /// A bind operation failed because the provided address is already in use or because there are no ephemeral ports available. + /// A bind operation failed because the provided address is already in + /// use or because there are no ephemeral ports available. + /// + /// POSIX equivalent: EADDRINUSE address-in-use, - /// The remote address is not reachable + /// The remote address is not reachable. + /// + /// POSIX equivalent: EHOSTUNREACH, EHOSTDOWN, ENETDOWN, ENETUNREACH, ENONET remote-unreachable, - /// The TCP connection was forcefully rejected + /// The connection was forcefully rejected. + /// + /// POSIX equivalent: ECONNREFUSED connection-refused, - /// The TCP connection was reset. + /// A write failed because the connection was broken. + /// + /// POSIX equivalent: EPIPE + connection-broken, + /// The connection was reset. + /// + /// POSIX equivalent: ECONNRESET connection-reset, - /// A TCP connection was aborted. + /// The connection was aborted. + /// + /// POSIX equivalent: ECONNABORTED connection-aborted, /// The size of a datagram sent to a UDP socket exceeded the maximum /// supported size. + /// + /// POSIX equivalent: EMSGSIZE datagram-too-large, + /// A catch-all for errors not captured by the existing variants. + /// Implementations can use this to extend the error type without + /// breaking existing code. + other(option), } - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) enum ip-address-family { /// Similar to `AF_INET` in POSIX. ipv4, @@ -65,19 +88,19 @@ interface types { ipv6, } - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type ipv4-address = tuple; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) type ipv6-address = tuple; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant ip-address { ipv4(ipv4-address), ipv6(ipv6-address), } - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record ipv4-socket-address { /// sin_port port: u16, @@ -85,7 +108,7 @@ interface types { address: ipv4-address, } - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) record ipv6-socket-address { /// sin6_port port: u16, @@ -97,7 +120,7 @@ interface types { scope-id: u32, } - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) variant ip-socket-address { ipv4(ipv4-socket-address), ipv6(ipv6-socket-address), @@ -112,39 +135,57 @@ interface types { /// - `connecting` /// - `connected` /// - `closed` - /// See + /// See /// for more information. /// /// Note: Except where explicitly mentioned, whenever this documentation uses /// the term "bound" without backticks it actually means: in the `bound` state *or higher*. /// (i.e. `bound`, `listening`, `connecting` or `connected`) /// + /// WASI uses shared ownership semantics: the `tcp-socket` handle and all + /// derived `stream` and `future` values reference a single underlying OS + /// socket: + /// - Send/receive streams remain functional after the original `tcp-socket` + /// handle is dropped. + /// - The stream returned by `listen` behaves similarly. + /// - Client sockets returned by `tcp-socket::listen` are independent and do + /// not keep the listening socket alive. + /// + /// The OS socket is closed only after the last handle is dropped. This + /// model has observable effects; for example, it affects when the local + /// port binding is released. + /// /// In addition to the general error codes documented on the /// `types::error-code` type, TCP socket methods may always return /// `error(invalid-state)` when in the `closed` state. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource tcp-socket { /// Create a new TCP socket. /// - /// Similar to `socket(AF_INET or AF_INET6, SOCK_STREAM, IPPROTO_TCP)` in POSIX. - /// On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise. + /// Similar to `socket(AF_INET or AF_INET6, SOCK_STREAM, IPPROTO_TCP)` + /// in POSIX. On IPv6 sockets, IPV6_V6ONLY is enabled by default and + /// can't be configured otherwise. /// /// Unlike POSIX, WASI sockets have no notion of a socket-level /// `O_NONBLOCK` flag. Instead they fully rely on the Component Model's /// async support. /// + /// # Typical errors + /// - `not-supported`: The `address-family` is not supported. (EAFNOSUPPORT) + /// /// # References /// - /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) create: static func(address-family: ip-address-family) -> result; /// Bind the socket to the provided IP address and port. /// - /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is left to the implementation to decide which - /// network interface(s) to bind to. - /// If the TCP/UDP port is zero, the socket will be bound to a random free port. + /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is + /// left to the implementation to decide which network interface(s) to + /// bind to. If the TCP/UDP port is zero, the socket will be bound to a + /// random free port. /// /// Bind can be attempted multiple times on the same socket, even with /// different arguments on each iteration. But never concurrently and @@ -161,21 +202,27 @@ interface types { /// - `address-not-bindable`: `local-address` is not an address that can be bound to. (EADDRNOTAVAIL) /// /// # Implementors note - /// When binding to a non-zero port, this bind operation shouldn't be affected by the TIME_WAIT - /// state of a recently closed socket on the same local address. In practice this means that the SO_REUSEADDR - /// socket option should be set implicitly on all platforms, except on Windows where this is the default behavior - /// and SO_REUSEADDR performs something different entirely. + /// The bind operation shouldn't be affected by the TIME_WAIT state of a + /// recently closed socket on the same local address. In practice this + /// means that the SO_REUSEADDR socket option should be set implicitly + /// on all platforms, except on Windows where this is the default + /// behavior and SO_REUSEADDR performs something different. /// /// # References /// - /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) bind: func(local-address: ip-socket-address) -> result<_, error-code>; /// Connect to a remote endpoint. /// - /// On success, the socket is transitioned into the `connected` state and this function returns a connection resource. + /// On success, the socket is transitioned into the `connected` state + /// and the `remote-address` of the socket is updated. + /// The `local-address` may be updated as well, based on the best network + /// path to `remote-address`. If the socket was not already explicitly + /// bound, this function will implicitly bind the socket to a random + /// free port. /// /// After a failed connection attempt, the socket will be in the `closed` /// state and the only valid action left is to `drop` the socket. A single @@ -202,7 +249,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) connect: async func(remote-address: ip-socket-address) -> result<_, error-code>; /// Start listening and return a stream of new inbound connections. /// @@ -274,7 +321,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) listen: func() -> result, error-code>; /// Transmit data to peer. /// @@ -288,6 +335,8 @@ interface types { /// /// # Typical errors /// - `invalid-state`: The socket is not in the `connected` state. (ENOTCONN) + /// - `invalid-state`: `send` has already been called on this socket. + /// - `connection-broken`: The connection is not writable anymore. (EPIPE, ECONNABORTED on Windows) /// - `connection-reset`: The connection was reset. (ECONNRESET) /// - `remote-unreachable`: The remote address is not reachable. (EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) /// @@ -296,31 +345,27 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) send: func(data: stream) -> future>; /// Read data from peer. /// - /// This function returns a `stream` which provides the data received from the - /// socket, and a `future` providing additional error information in case the - /// socket is closed abnormally. + /// Returns a `stream` of data sent by the peer. The implementation + /// drops the stream once no more data is available. At that point, the + /// returned `future` resolves to: + /// - `ok` after a graceful shutdown from the peer (i.e. a FIN packet), or + /// - `err` if the socket was closed abnormally. /// - /// If the socket is closed normally, `stream.read` on the `stream` will return - /// `read-status::closed` with no `error-context` and the future resolves to - /// the value `ok`. If the socket is closed abnormally, `stream.read` on the - /// `stream` returns `read-status::closed` with an `error-context` and the future - /// resolves to `err` with an `error-code`. + /// `receive` may be called only once per socket. Subsequent calls return + /// a closed stream and a future resolved to `err(invalid-state)`. /// - /// `receive` is meant to be called only once per socket. If it is called more - /// than once, the subsequent calls return a new `stream` that fails as if it - /// were closed abnormally. - /// - /// If the caller is not expecting to receive any data from the peer, - /// they may drop the stream. Any data still in the receive queue + /// If the caller is not expecting to receive any more data from the peer, + /// they should drop the stream. Any data still in the receive queue /// will be discarded. This is equivalent to calling `shutdown(SHUT_RD)` /// in POSIX. /// /// # Typical errors /// - `invalid-state`: The socket is not in the `connected` state. (ENOTCONN) + /// - `invalid-state`: `receive` has already been called on this socket. /// - `connection-reset`: The connection was reset. (ECONNRESET) /// - `remote-unreachable`: The remote address is not reachable. (EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) /// @@ -329,7 +374,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) receive: func() -> tuple, future>>; /// Get the bound local address. /// @@ -337,7 +382,8 @@ interface types { /// > If the socket has not been bound to a local name, the value /// > stored in the object pointed to by `address` is unspecified. /// - /// WASI is stricter and requires `get-local-address` to return `invalid-state` when the socket hasn't been bound yet. + /// WASI is stricter and requires `get-local-address` to return + /// `invalid-state` when the socket hasn't been bound yet. /// /// # Typical errors /// - `invalid-state`: The socket is not bound to any local address. @@ -347,7 +393,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-local-address: func() -> result; /// Get the remote address. /// @@ -359,30 +405,32 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-remote-address: func() -> result; /// Whether the socket is in the `listening` state. /// /// Equivalent to the SO_ACCEPTCONN socket option. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-is-listening: func() -> bool; /// Whether this is a IPv4 or IPv6 socket. /// /// This is the value passed to the constructor. /// /// Equivalent to the SO_DOMAIN socket option. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-address-family: func() -> ip-address-family; - /// Hints the desired listen queue size. Implementations are free to ignore this. + /// Hints the desired listen queue size. Implementations are free to + /// ignore this. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. + /// Any other value will never cause an error, but it might be silently + /// clamped and/or rounded. /// /// # Typical errors /// - `not-supported`: (set) The platform does not support changing the backlog size after the initial listen. /// - `invalid-argument`: (set) The provided value was 0. /// - `invalid-state`: (set) The socket is in the `connecting` or `connected` state. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-listen-backlog-size: func(value: u64) -> result<_, error-code>; /// Enables or disables keepalive. /// @@ -390,54 +438,60 @@ interface types { /// - `keep-alive-idle-time` /// - `keep-alive-interval` /// - `keep-alive-count` - /// These properties can be configured while `keep-alive-enabled` is false, but only come into effect when `keep-alive-enabled` is true. + /// These properties can be configured while `keep-alive-enabled` is + /// false, but only come into effect when `keep-alive-enabled` is true. /// /// Equivalent to the SO_KEEPALIVE socket option. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-keep-alive-enabled: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-keep-alive-enabled: func(value: bool) -> result<_, error-code>; - /// Amount of time the connection has to be idle before TCP starts sending keepalive packets. + /// Amount of time the connection has to be idle before TCP starts + /// sending keepalive packets. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the TCP_KEEPIDLE socket option. (TCP_KEEPALIVE on MacOS) /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-keep-alive-idle-time: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-keep-alive-idle-time: func(value: duration) -> result<_, error-code>; /// The time between keepalive packets. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the TCP_KEEPINTVL socket option. /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-keep-alive-interval: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-keep-alive-interval: func(value: duration) -> result<_, error-code>; - /// The maximum amount of keepalive packets TCP should send before aborting the connection. + /// The maximum amount of keepalive packets TCP should send before + /// aborting the connection. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the TCP_KEEPCNT socket option. /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-keep-alive-count: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-keep-alive-count: func(value: u32) -> result<_, error-code>; /// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. /// @@ -445,37 +499,49 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The TTL value must be 1 or higher. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-hop-limit: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-hop-limit: func(value: u8) -> result<_, error-code>; - /// The kernel buffer space reserved for sends/receives on this socket. + /// Kernel buffer space reserved for sending/receiving on this socket. + /// Implementations usually treat this as a cap the buffer can grow to, + /// rather than allocating the full amount immediately. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. + /// + /// This is only a performance hint. The implementation may ignore it or + /// tweak it based on real traffic patterns. + /// Linux and macOS appear to behave differently depending on whether a + /// buffer size was explicitly set. When set, they tend to honor it; when + /// not set, they dynamically adjust the buffer size as the connection + /// progresses. This is especially noticeable when comparing the values + /// from before and after connection establishment. /// /// Equivalent to the SO_RCVBUF and SO_SNDBUF socket options. /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-receive-buffer-size: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-receive-buffer-size: func(value: u64) -> result<_, error-code>; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-send-buffer-size: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-send-buffer-size: func(value: u64) -> result<_, error-code>; } /// A UDP socket handle. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resource udp-socket { /// Create a new UDP socket. /// - /// Similar to `socket(AF_INET or AF_INET6, SOCK_DGRAM, IPPROTO_UDP)` in POSIX. - /// On IPv6 sockets, IPV6_V6ONLY is enabled by default and can't be configured otherwise. + /// Similar to `socket(AF_INET or AF_INET6, SOCK_DGRAM, IPPROTO_UDP)` + /// in POSIX. On IPv6 sockets, IPV6_V6ONLY is enabled by default and + /// can't be configured otherwise. /// /// Unlike POSIX, WASI sockets have no notion of a socket-level /// `O_NONBLOCK` flag. Instead they fully rely on the Component Model's @@ -486,13 +552,14 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) create: static func(address-family: ip-address-family) -> result; /// Bind the socket to the provided IP address and port. /// - /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is left to the implementation to decide which - /// network interface(s) to bind to. - /// If the port is zero, the socket will be bound to a random free port. + /// If the IP address is zero (`0.0.0.0` in IPv4, `::` in IPv6), it is + /// left to the implementation to decide which network interface(s) to + /// bind to. If the port is zero, the socket will be bound to a random + /// free port. /// /// # Typical errors /// - `invalid-argument`: The `local-address` has the wrong address family. (EAFNOSUPPORT, EFAULT on Windows) @@ -506,7 +573,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) bind: func(local-address: ip-socket-address) -> result<_, error-code>; /// Associate this socket with a specific peer address. /// @@ -544,12 +611,12 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) connect: func(remote-address: ip-socket-address) -> result<_, error-code>; /// Dissociate this socket from its peer address. /// /// After calling this method, `send` & `receive` are free to communicate - /// with any address again. + /// with any remote address again. /// /// The POSIX equivalent of this is calling `connect` with an `AF_UNSPEC` address. /// @@ -561,7 +628,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) disconnect: func() -> result<_, error-code>; /// Send a message on the socket to a particular peer. /// @@ -573,6 +640,9 @@ interface types { /// _may_ be provided but then it must be identical to the address /// passed to `connect`. /// + /// If the socket has not been explicitly bound, it will be + /// implicitly bound to a random free port. + /// /// Implementations may trap if the `data` length exceeds 64 KiB. /// /// # Typical errors @@ -584,6 +654,14 @@ interface types { /// - `remote-unreachable`: The remote address is not reachable. (ECONNRESET, ENETRESET on Windows, EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET) /// - `connection-refused`: The connection was refused. (ECONNREFUSED) /// - `datagram-too-large`: The datagram is too large. (EMSGSIZE) + /// - `address-in-use`: Tried to perform an implicit bind, but there were no ephemeral ports available. (EADDRINUSE) + /// + /// # Implementors note + /// WASI requires `send` to perform an implicit bind if the socket + /// has not been bound. Not all platforms (notably Windows) exhibit + /// this behavior natively. On such platforms, the WASI implementation + /// should emulate it by performing the bind if the guest has not + /// already done so. /// /// # References /// - @@ -594,7 +672,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) send: async func(data: list, remote-address: option) -> result<_, error-code>; /// Receive a message on the socket. /// @@ -619,7 +697,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) receive: async func() -> result, ip-socket-address>, error-code>; /// Get the current bound address. /// @@ -627,7 +705,8 @@ interface types { /// > If the socket has not been bound to a local name, the value /// > stored in the object pointed to by `address` is unspecified. /// - /// WASI is stricter and requires `get-local-address` to return `invalid-state` when the socket hasn't been bound yet. + /// WASI is stricter and requires `get-local-address` to return + /// `invalid-state` when the socket hasn't been bound yet. /// /// # Typical errors /// - `invalid-state`: The socket is not bound to any local address. @@ -637,7 +716,7 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-local-address: func() -> result; /// Get the address the socket is currently "connected" to. /// @@ -649,14 +728,14 @@ interface types { /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-remote-address: func() -> result; /// Whether this is a IPv4 or IPv6 socket. /// /// This is the value passed to the constructor. /// /// Equivalent to the SO_DOMAIN socket option. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-address-family: func() -> ip-address-family; /// Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. /// @@ -664,41 +743,42 @@ interface types { /// /// # Typical errors /// - `invalid-argument`: (set) The TTL value must be 1 or higher. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-unicast-hop-limit: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-unicast-hop-limit: func(value: u8) -> result<_, error-code>; - /// The kernel buffer space reserved for sends/receives on this socket. + /// Kernel buffer space reserved for sending/receiving on this socket. + /// Implementations usually treat this as a cap the buffer can grow to, + /// rather than allocating the full amount immediately. /// /// If the provided value is 0, an `invalid-argument` error is returned. - /// Any other value will never cause an error, but it might be silently clamped and/or rounded. - /// I.e. after setting a value, reading the same setting back may return a different value. + /// All other values are accepted without error, but may be + /// clamped or rounded. As a result, the value read back from + /// this setting may differ from the value that was set. /// /// Equivalent to the SO_RCVBUF and SO_SNDBUF socket options. /// /// # Typical errors /// - `invalid-argument`: (set) The provided value was 0. - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-receive-buffer-size: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-receive-buffer-size: func(value: u64) -> result<_, error-code>; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) get-send-buffer-size: func() -> result; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) set-send-buffer-size: func(value: u64) -> result<_, error-code>; } } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) interface ip-name-lookup { - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) use types.{ip-address}; /// Lookup error codes. - @since(version = 0.3.0-rc-2026-02-09) - enum error-code { - /// Unknown error - unknown, + @since(version = 0.3.0-rc-2026-03-15) + variant error-code { /// Access denied. /// /// POSIX equivalent: EACCES, EPERM @@ -719,13 +799,17 @@ interface ip-name-lookup { /// /// POSIX equivalent: EAI_FAIL permanent-resolver-failure, + /// A catch-all for errors not captured by the existing variants. + /// Implementations can use this to extend the error type without + /// breaking existing code. + other(option), } /// Resolve an internet host name to a list of IP addresses. /// - /// Unicode domain names are automatically converted to ASCII using IDNA encoding. - /// If the input is an IP address string, the address is parsed and returned - /// as-is without making any external requests. + /// Unicode domain names are automatically converted to ASCII using IDNA + /// encoding. If the input is an IP address string, the address is parsed + /// and returned as-is without making any external requests. /// /// See the wasi-socket proposal README.md for a comparison with getaddrinfo. /// @@ -735,24 +819,21 @@ interface ip-name-lookup { /// with at least one address. Additionally, this function never returns /// IPv4-mapped IPv6 addresses. /// - /// The returned future will resolve to an error code in case of failure. - /// It will resolve to success once the returned stream is exhausted. - /// /// # References: /// - /// - /// - /// - - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) resolve-addresses: async func(name: string) -> result, error-code>; } -@since(version = 0.3.0-rc-2026-02-09) +@since(version = 0.3.0-rc-2026-03-15) world imports { - @since(version = 0.3.0-rc-2026-02-09) - import wasi:clocks/types@0.3.0-rc-2026-02-09; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) + import wasi:clocks/types@0.3.0-rc-2026-03-15; + @since(version = 0.3.0-rc-2026-03-15) import types; - @since(version = 0.3.0-rc-2026-02-09) + @since(version = 0.3.0-rc-2026-03-15) import ip-name-lookup; }