diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d540eb..d443520 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,11 +23,11 @@ jobs: - name: Install Wasmtime uses: bytecodealliance/actions/wasmtime/setup@v1 with: - version: "v43.0.0" + version: "v48.0.1" - name: Install wasm-tools uses: bytecodealliance/actions/wasm-tools/setup@v1 with: - version: "1.246.1" + version: "1.259.0" - run: cargo build -p wasip2 --examples --target wasm32-wasip2 --no-default-features - run: wasmtime run ./target/wasm32-wasip2/debug/examples/hello-world-no_std.wasm @@ -97,7 +97,7 @@ jobs: ./ci/vendor-wit.sh git diff --exit-code - run: | - version=0.61.0 + version=0.62.0 mkdir wit-bindgen cd wit-bindgen @@ -137,11 +137,11 @@ jobs: - name: Install wasmtime uses: bytecodealliance/actions/wasmtime/setup@v1 with: - version: "v43.0.0" + version: "v48.0.1" - name: Install wasm-tools uses: bytecodealliance/actions/wasm-tools/setup@v1 with: - version: "1.246.1" + version: "1.259.0" - run: cargo build -p wasip3 --examples --target wasm32-wasip2 # TODO: uncomment this once wasmtime supports WASI 0.3.0 diff --git a/Cargo.toml b/Cargo.toml index 55a4b67..2da5622 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.61.0", default-features = false } +wit-bindgen = { version = "0.62.0", default-features = false } wasip1 = { version = "1.0.0", path = "crates/wasip1", default-features = false } wasip2 = { version = "2.0.0", path = "crates/wasip2", default-features = false } wasip3 = { version = "0.8.0", path = "crates/wasip3", default-features = false } diff --git a/crates/wasip2/src/command.rs b/crates/wasip2/src/command.rs index 842e8aa..76ec78b 100644 --- a/crates/wasip2/src/command.rs +++ b/crates/wasip2/src/command.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.62.0. DO NOT EDIT! // Options used: // * std_feature // * with "wasi:cli/environment@0.2.12" = "crate::cli::environment" @@ -167,7 +167,7 @@ macro_rules! __export_command_impl { exports::wasi::cli::run::__export_wasi_cli_run_0_2_12_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.61.0:wasi:cli@0.2.12:command:imports and exportsrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-command-world")] + "component-type:wit-bindgen:0.62.0:wasi:cli@0.2.12:command:imports and exportsrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-command-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE : [u8; 10839] = * b"\ @@ -389,7 +389,7 @@ get-insecure-random-u64\x01\x02\x03\0\x1bwasi:random/insecure@0.2.12\x05*\x01B\x ure-seed@0.2.12\x05+\x01B\x03\x01j\0\0\x01@\0\0\0\x04\0\x03run\x01\x01\x04\0\x13\ wasi:cli/run@0.2.12\x05,\x04\0\x17wasi:cli/command@0.2.12\x04\0\x0b\x0d\x01\0\x07\ command\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.25\ -8.0\x10wit-bindgen-rust\x060.61.0"; +9.0\x10wit-bindgen-rust\x060.62.0"; }; }; } @@ -398,8 +398,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.61.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-command-world-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-command-world"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-command-world-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.2.12:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-command-world"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -621,8 +621,8 @@ get-insecure-random-u64\x01\x02\x03\0\x1bwasi:random/insecure@0.2.12\x05*\x01B\x \x01o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x20wasi:random/insec\ ure-seed@0.2.12\x05+\x04\07wasi:cli/command-with-all-of-its-exports-removed@0.2.\ 12\x04\0\x0b-\x01\0'command-with-all-of-its-exports-removed\x03\0\0\0G\x09produc\ -ers\x01\x0cprocessed-by\x02\x0dwit-component\x070.258.0\x10wit-bindgen-rust\x060\ -.61.0"; +ers\x01\x0cprocessed-by\x02\x0dwit-component\x070.259.0\x10wit-bindgen-rust\x060\ +.62.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 56e0e29..be5b855 100644 --- a/crates/wasip2/src/imports.rs +++ b/crates/wasip2/src/imports.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.62.0. DO NOT EDIT! // Options used: // * std_feature // * type_section_suffix: "rust-wasip2-2.0.0+wasi-0.2.12-from-crates-io" @@ -10119,8 +10119,8 @@ mod _rt { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] -#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.2.12:imports:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.2.12:imports:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.2.12:imports:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.2.12:imports:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -10341,8 +10341,8 @@ get-random-u64\x01\x02\x03\0\x19wasi:random/random@0.2.12\x05)\x01B\x05\x01p}\x0 get-insecure-random-u64\x01\x02\x03\0\x1bwasi:random/insecure@0.2.12\x05*\x01B\x03\ \x01o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x20wasi:random/insec\ ure-seed@0.2.12\x05+\x04\0\x17wasi:cli/imports@0.2.12\x04\0\x0b\x0d\x01\0\x07imp\ -orts\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.258.0\ -\x10wit-bindgen-rust\x060.61.0"; +orts\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.259.0\ +\x10wit-bindgen-rust\x060.62.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 dc1b33f..3fbff3b 100644 --- a/crates/wasip2/src/proxy.rs +++ b/crates/wasip2/src/proxy.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.62.0. DO NOT EDIT! // Options used: // * std_feature // * with "wasi:cli/stdin@0.2.12" = "crate::cli::stdin" @@ -7172,7 +7172,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.61.0:wasi:http@0.2.12:proxy:imports and exportsrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-proxy-world")] + "component-type:wit-bindgen:0.62.0:wasi:http@0.2.12:proxy:imports and exportsrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-proxy-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE : [u8; 7053] = * b"\ @@ -7317,7 +7317,7 @@ ndler@0.2.12\x05\x13\x02\x03\0\x09\x10incoming-request\x02\x03\0\x09\x11response request\x04\x0cresponse-out\x05\x01\0\x04\0\x06handle\x01\x06\x04\0!wasi:http/in\ coming-handler@0.2.12\x05\x16\x04\0\x16wasi:http/proxy@0.2.12\x04\0\x0b\x0b\x01\0\ \x05proxy\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.\ -258.0\x10wit-bindgen-rust\x060.61.0"; +259.0\x10wit-bindgen-rust\x060.62.0"; }; }; } @@ -7326,8 +7326,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.61.0:wasi:http@0.2.12:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-proxy-world-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:http@0.2.12:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-proxy-world"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:http@0.2.12:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-proxy-world-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:http@0.2.12:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-2.0.0+wasi-0.2.12-from-crates-io-proxy-world"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -7469,7 +7469,7 @@ h\x07\x01k\x1b\x01@\x01\x03err\x8b\x01\0\x8c\x01\x04\0\x0fhttp-error-code\x01\x8 est\x08\x07options\x0a\0\x0c\x04\0\x06handle\x01\x0d\x03\0!wasi:http/outgoing-ha\ ndler@0.2.12\x05\x13\x04\06wasi:http/proxy-with-all-of-its-exports-removed@0.2.1\ 2\x04\0\x0b+\x01\0%proxy-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\ -\x01\x0cprocessed-by\x02\x0dwit-component\x070.258.0\x10wit-bindgen-rust\x060.61\ +\x01\x0cprocessed-by\x02\x0dwit-component\x070.259.0\x10wit-bindgen-rust\x060.62\ .0"; #[inline(never)] #[doc(hidden)] diff --git a/crates/wasip3/Cargo.toml b/crates/wasip3/Cargo.toml index b62ef9d..48a6a3d 100644 --- a/crates/wasip3/Cargo.toml +++ b/crates/wasip3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasip3" -version = "0.8.0+wasi-0.3.0" +version = "0.9.0+wasi-0.3.0" 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 d75c7d5..199c4a4 100644 --- a/crates/wasip3/src/command.rs +++ b/crates/wasip3/src/command.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.62.0. DO NOT EDIT! // Options used: // * std_feature // * with "wasi:cli/environment@0.3.0" = "crate::cli::environment" @@ -22,7 +22,7 @@ // * with "wasi:random/insecure-seed@0.3.0" = "crate::random::insecure_seed" // * with "wasi:sockets/types@0.3.0" = "crate::sockets::types" // * with "wasi:sockets/ip-name-lookup@0.3.0" = "crate::sockets::ip_name_lookup" -// * type_section_suffix: "rust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-command-world" +// * type_section_suffix: "rust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-command-world" // * default-bindings-module: "$crate" // * export-macro-name: _export_command // * pub-export-macro @@ -178,7 +178,7 @@ macro_rules! __export_command_impl { exports::wasi::cli::run::__export_wasi_cli_run_0_3_0_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.61.0:wasi:cli@0.3.0:command:imports and exportsrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-command-world")] + "component-type:wit-bindgen:0.62.0:wasi:cli@0.3.0:command:imports and exportsrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-command-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE : [u8; 7934] = * b"\ @@ -338,7 +338,7 @@ B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\ \0\x1fwasi:random/insecure-seed@0.3.0\x05\x1b\x01B\x03\x01j\0\0\x01C\0\0\0\x04\0\ \x03run\x01\x01\x04\0\x12wasi:cli/run@0.3.0\x05\x1c\x04\0\x16wasi:cli/command@0.\ 3.0\x04\0\x0b\x0d\x01\0\x07command\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\ -\x0dwit-component\x070.258.0\x10wit-bindgen-rust\x060.61.0"; +\x0dwit-component\x070.259.0\x10wit-bindgen-rust\x060.62.0"; }; }; } @@ -347,8 +347,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.61.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-command-world-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-command-world"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-command-world-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.3.0:command-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-command-world"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -508,8 +508,8 @@ B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\ 3.0\x05\x1a\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\x03\ \0\x1fwasi:random/insecure-seed@0.3.0\x05\x1b\x04\06wasi:cli/command-with-all-of\ -its-exports-removed@0.3.0\x04\0\x0b-\x01\0'command-with-all-of-its-exports-remo\ -ved\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.258.0\x10\ -wit-bindgen-rust\x060.61.0"; +ved\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.259.0\x10\ +wit-bindgen-rust\x060.62.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 0e66e4d..9812e08 100644 --- a/crates/wasip3/src/imports.rs +++ b/crates/wasip3/src/imports.rs @@ -1,7 +1,7 @@ -// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.62.0. DO NOT EDIT! // Options used: // * std_feature -// * type_section_suffix: "rust-wasip3-0.8.0+wasi-0.3.0-from-crates-io" +// * type_section_suffix: "rust-wasip3-0.9.0+wasi-0.3.0-from-crates-io" #[rustfmt::skip] #[allow(dead_code, clippy::all)] pub mod wasi { @@ -13080,22 +13080,52 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stdin@0.3.0")] - unsafe extern "C" { - #[link_name = "[future-new-1]read-via-stream"] - fn new() -> u64; - #[link_name = "[future-cancel-write-1]read-via-stream"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[future-cancel-read-1]read-via-stream"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[future-drop-writable-1]read-via-stream"] - fn drop_writable(_: u32); - #[link_name = "[future-drop-readable-1]read-via-stream"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][future-read-1]read-via-stream"] - fn start_read(_: u32, _: *mut u8) -> u32; - #[link_name = "[async-lower][future-write-1]read-via-stream"] - fn start_write(_: u32, _: *const u8) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:cli/stdin@0.3.0")] + unsafe extern "C" { + #[link_name = "[future-new-1]read-via-stream"] + pub(super) fn new() -> u64; + #[link_name = "[future-cancel-write-1]read-via-stream"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[future-cancel-read-1]read-via-stream"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[future-drop-writable-1]read-via-stream"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[future-drop-readable-1]read-via-stream"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][future-read-1]read-via-stream"] + pub(super) fn start_read(_: u32, _: *mut u8) -> u32; + #[link_name = "[async-lower][future-write-1]read-via-stream"] + pub(super) fn start_write(_: u32, _: *const u8) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read(handle: u32, ptr: *mut u8) -> u32 { + unsafe { imports::start_read(handle, ptr) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write(handle: u32, ptr: *const u8) -> u32 { + unsafe { imports::start_write(handle, ptr) } } unsafe fn lift( ptr: *mut u8, @@ -13191,22 +13221,52 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:filesystem/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[future-new-1][method]descriptor.read-via-stream"] - fn new() -> u64; - #[link_name = "[future-cancel-write-1][method]descriptor.read-via-stream"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[future-cancel-read-1][method]descriptor.read-via-stream"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[future-drop-writable-1][method]descriptor.read-via-stream"] - fn drop_writable(_: u32); - #[link_name = "[future-drop-readable-1][method]descriptor.read-via-stream"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][future-read-1][method]descriptor.read-via-stream"] - fn start_read(_: u32, _: *mut u8) -> u32; - #[link_name = "[async-lower][future-write-1][method]descriptor.read-via-stream"] - fn start_write(_: u32, _: *const u8) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:filesystem/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[future-new-1][method]descriptor.read-via-stream"] + pub(super) fn new() -> u64; + #[link_name = "[future-cancel-write-1][method]descriptor.read-via-stream"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[future-cancel-read-1][method]descriptor.read-via-stream"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[future-drop-writable-1][method]descriptor.read-via-stream"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[future-drop-readable-1][method]descriptor.read-via-stream"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][future-read-1][method]descriptor.read-via-stream"] + pub(super) fn start_read(_: u32, _: *mut u8) -> u32; + #[link_name = "[async-lower][future-write-1][method]descriptor.read-via-stream"] + pub(super) fn start_write(_: u32, _: *const u8) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read(handle: u32, ptr: *mut u8) -> u32 { + unsafe { imports::start_read(handle, ptr) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write(handle: u32, ptr: *const u8) -> u32 { + unsafe { imports::start_write(handle, ptr) } } unsafe fn lift( ptr: *mut u8, @@ -13661,22 +13721,52 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:sockets/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[future-new-1][method]tcp-socket.send"] - fn new() -> u64; - #[link_name = "[future-cancel-write-1][method]tcp-socket.send"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[future-cancel-read-1][method]tcp-socket.send"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[future-drop-writable-1][method]tcp-socket.send"] - fn drop_writable(_: u32); - #[link_name = "[future-drop-readable-1][method]tcp-socket.send"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][future-read-1][method]tcp-socket.send"] - fn start_read(_: u32, _: *mut u8) -> u32; - #[link_name = "[async-lower][future-write-1][method]tcp-socket.send"] - fn start_write(_: u32, _: *const u8) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:sockets/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[future-new-1][method]tcp-socket.send"] + pub(super) fn new() -> u64; + #[link_name = "[future-cancel-write-1][method]tcp-socket.send"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[future-cancel-read-1][method]tcp-socket.send"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[future-drop-writable-1][method]tcp-socket.send"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[future-drop-readable-1][method]tcp-socket.send"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][future-read-1][method]tcp-socket.send"] + pub(super) fn start_read(_: u32, _: *mut u8) -> u32; + #[link_name = "[async-lower][future-write-1][method]tcp-socket.send"] + pub(super) fn start_write(_: u32, _: *const u8) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read(handle: u32, ptr: *mut u8) -> u32 { + unsafe { imports::start_read(handle, ptr) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write(handle: u32, ptr: *const u8) -> u32 { + unsafe { imports::start_write(handle, ptr) } } unsafe fn lift( ptr: *mut u8, @@ -13989,22 +14079,60 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:cli/stdin@0.3.0")] - unsafe extern "C" { - #[link_name = "[stream-new-0]read-via-stream"] - fn new() -> u64; - #[link_name = "[stream-cancel-write-0]read-via-stream"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[stream-cancel-read-0]read-via-stream"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[stream-drop-writable-0]read-via-stream"] - fn drop_writable(_: u32); - #[link_name = "[stream-drop-readable-0]read-via-stream"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][stream-read-0]read-via-stream"] - fn start_read(_: u32, _: *mut u8, _: usize) -> u32; - #[link_name = "[async-lower][stream-write-0]read-via-stream"] - fn start_write(_: u32, _: *const u8, _: usize) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:cli/stdin@0.3.0")] + unsafe extern "C" { + #[link_name = "[stream-new-0]read-via-stream"] + pub(super) fn new() -> u64; + #[link_name = "[stream-cancel-write-0]read-via-stream"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[stream-cancel-read-0]read-via-stream"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[stream-drop-writable-0]read-via-stream"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[stream-drop-readable-0]read-via-stream"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][stream-read-0]read-via-stream"] + pub(super) fn start_read(_: u32, _: *mut u8, _: usize) -> u32; + #[link_name = "[async-lower][stream-write-0]read-via-stream"] + pub(super) fn start_write(_: u32, _: *const u8, _: usize) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read( + handle: u32, + ptr: *mut u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_read(handle, ptr, _extra) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write( + handle: u32, + ptr: *const u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_write(handle, ptr, _extra) } } pub static VTABLE: wit_bindgen::rt::async_support::StreamVtable = wit_bindgen::rt::async_support::StreamVtable::< u8, @@ -14057,22 +14185,60 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:filesystem/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[stream-new-0][method]descriptor.read-directory"] - fn new() -> u64; - #[link_name = "[stream-cancel-write-0][method]descriptor.read-directory"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[stream-cancel-read-0][method]descriptor.read-directory"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[stream-drop-writable-0][method]descriptor.read-directory"] - fn drop_writable(_: u32); - #[link_name = "[stream-drop-readable-0][method]descriptor.read-directory"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][stream-read-0][method]descriptor.read-directory"] - fn start_read(_: u32, _: *mut u8, _: usize) -> u32; - #[link_name = "[async-lower][stream-write-0][method]descriptor.read-directory"] - fn start_write(_: u32, _: *const u8, _: usize) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:filesystem/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[stream-new-0][method]descriptor.read-directory"] + pub(super) fn new() -> u64; + #[link_name = "[stream-cancel-write-0][method]descriptor.read-directory"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[stream-cancel-read-0][method]descriptor.read-directory"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[stream-drop-writable-0][method]descriptor.read-directory"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[stream-drop-readable-0][method]descriptor.read-directory"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][stream-read-0][method]descriptor.read-directory"] + pub(super) fn start_read(_: u32, _: *mut u8, _: usize) -> u32; + #[link_name = "[async-lower][stream-write-0][method]descriptor.read-directory"] + pub(super) fn start_write(_: u32, _: *const u8, _: usize) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read( + handle: u32, + ptr: *mut u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_read(handle, ptr, _extra) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write( + handle: u32, + ptr: *const u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_write(handle, ptr, _extra) } } unsafe fn lift( ptr: *mut u8, @@ -14297,22 +14463,60 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:sockets/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[stream-new-0][method]tcp-socket.listen"] - fn new() -> u64; - #[link_name = "[stream-cancel-write-0][method]tcp-socket.listen"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[stream-cancel-read-0][method]tcp-socket.listen"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[stream-drop-writable-0][method]tcp-socket.listen"] - fn drop_writable(_: u32); - #[link_name = "[stream-drop-readable-0][method]tcp-socket.listen"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][stream-read-0][method]tcp-socket.listen"] - fn start_read(_: u32, _: *mut u8, _: usize) -> u32; - #[link_name = "[async-lower][stream-write-0][method]tcp-socket.listen"] - fn start_write(_: u32, _: *const u8, _: usize) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:sockets/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[stream-new-0][method]tcp-socket.listen"] + pub(super) fn new() -> u64; + #[link_name = "[stream-cancel-write-0][method]tcp-socket.listen"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[stream-cancel-read-0][method]tcp-socket.listen"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[stream-drop-writable-0][method]tcp-socket.listen"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[stream-drop-readable-0][method]tcp-socket.listen"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][stream-read-0][method]tcp-socket.listen"] + pub(super) fn start_read(_: u32, _: *mut u8, _: usize) -> u32; + #[link_name = "[async-lower][stream-write-0][method]tcp-socket.listen"] + pub(super) fn start_write(_: u32, _: *const u8, _: usize) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read( + handle: u32, + ptr: *mut u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_read(handle, ptr, _extra) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write( + handle: u32, + ptr: *const u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_write(handle, ptr, _extra) } } unsafe fn lift(ptr: *mut u8) -> super::super::wasi::sockets::types::TcpSocket { unsafe { @@ -14363,8 +14567,8 @@ pub mod wit_stream { #[rustfmt::skip] #[cfg(target_arch = "wasm32")] -#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.3.0:imports:encoded worldrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:cli@0.3.0:imports:encoded worldrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.3.0:imports:encoded worldrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:cli@0.3.0:imports:encoded worldrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -14524,7 +14728,7 @@ B\x05\x01p}\x01@\x01\x07max-lenw\0\0\x04\0\x19get-insecure-random-bytes\x01\x01\ 3.0\x05\x1a\x01B\x03\x01o\x02ww\x01@\0\0\0\x04\0\x11get-insecure-seed\x01\x01\x03\ \0\x1fwasi:random/insecure-seed@0.3.0\x05\x1b\x04\0\x16wasi:cli/imports@0.3.0\x04\ \0\x0b\x0d\x01\0\x07imports\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dw\ -it-component\x070.258.0\x10wit-bindgen-rust\x060.61.0"; +it-component\x070.259.0\x10wit-bindgen-rust\x060.62.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 b83b7af..1257316 100644 --- a/crates/wasip3/src/service.rs +++ b/crates/wasip3/src/service.rs @@ -1,4 +1,4 @@ -// Generated by `wit-bindgen` 0.61.0. DO NOT EDIT! +// Generated by `wit-bindgen` 0.62.0. DO NOT EDIT! // Options used: // * std_feature // * with "wasi:cli/stdin@0.3.0" = "crate::cli::stdin" @@ -11,7 +11,7 @@ // * with "wasi:random/random@0.3.0" = "crate::random::random" // * with "wasi:random/insecure@0.3.0" = "crate::random::insecure" // * with "wasi:random/insecure-seed@0.3.0" = "crate::random::insecure_seed" -// * type_section_suffix: "rust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-service-world" +// * type_section_suffix: "rust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-service-world" // * default-bindings-module: "$crate" // * export-macro-name: _export_service // * pub-export-macro @@ -4696,22 +4696,52 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[future-new-1][static]request.new"] - fn new() -> u64; - #[link_name = "[future-cancel-write-1][static]request.new"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[future-cancel-read-1][static]request.new"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[future-drop-writable-1][static]request.new"] - fn drop_writable(_: u32); - #[link_name = "[future-drop-readable-1][static]request.new"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][future-read-1][static]request.new"] - fn start_read(_: u32, _: *mut u8) -> u32; - #[link_name = "[async-lower][future-write-1][static]request.new"] - fn start_write(_: u32, _: *const u8) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:http/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[future-new-1][static]request.new"] + pub(super) fn new() -> u64; + #[link_name = "[future-cancel-write-1][static]request.new"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[future-cancel-read-1][static]request.new"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[future-drop-writable-1][static]request.new"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[future-drop-readable-1][static]request.new"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][future-read-1][static]request.new"] + pub(super) fn start_read(_: u32, _: *mut u8) -> u32; + #[link_name = "[async-lower][future-write-1][static]request.new"] + pub(super) fn start_write(_: u32, _: *const u8) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read(handle: u32, ptr: *mut u8) -> u32 { + unsafe { imports::start_read(handle, ptr) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write(handle: u32, ptr: *const u8) -> u32 { + unsafe { imports::start_write(handle, ptr) } } unsafe fn lift( ptr: *mut u8, @@ -6011,22 +6041,52 @@ pub mod wit_future { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[future-new-2][static]request.new"] - fn new() -> u64; - #[link_name = "[future-cancel-write-2][static]request.new"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[future-cancel-read-2][static]request.new"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[future-drop-writable-2][static]request.new"] - fn drop_writable(_: u32); - #[link_name = "[future-drop-readable-2][static]request.new"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][future-read-2][static]request.new"] - fn start_read(_: u32, _: *mut u8) -> u32; - #[link_name = "[async-lower][future-write-2][static]request.new"] - fn start_write(_: u32, _: *const u8) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:http/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[future-new-2][static]request.new"] + pub(super) fn new() -> u64; + #[link_name = "[future-cancel-write-2][static]request.new"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[future-cancel-read-2][static]request.new"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[future-drop-writable-2][static]request.new"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[future-drop-readable-2][static]request.new"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][future-read-2][static]request.new"] + pub(super) fn start_read(_: u32, _: *mut u8) -> u32; + #[link_name = "[async-lower][future-write-2][static]request.new"] + pub(super) fn start_write(_: u32, _: *const u8) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read(handle: u32, ptr: *mut u8) -> u32 { + unsafe { imports::start_read(handle, ptr) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write(handle: u32, ptr: *const u8) -> u32 { + unsafe { imports::start_write(handle, ptr) } } unsafe fn lift( ptr: *mut u8, @@ -7308,22 +7368,60 @@ pub mod wit_stream { unreachable!() } #[cfg(target_arch = "wasm32")] - #[link(wasm_import_module = "wasi:http/types@0.3.0")] - unsafe extern "C" { - #[link_name = "[stream-new-0][static]request.new"] - fn new() -> u64; - #[link_name = "[stream-cancel-write-0][static]request.new"] - fn cancel_write(_: u32) -> u32; - #[link_name = "[stream-cancel-read-0][static]request.new"] - fn cancel_read(_: u32) -> u32; - #[link_name = "[stream-drop-writable-0][static]request.new"] - fn drop_writable(_: u32); - #[link_name = "[stream-drop-readable-0][static]request.new"] - fn drop_readable(_: u32); - #[link_name = "[async-lower][stream-read-0][static]request.new"] - fn start_read(_: u32, _: *mut u8, _: usize) -> u32; - #[link_name = "[async-lower][stream-write-0][static]request.new"] - fn start_write(_: u32, _: *const u8, _: usize) -> u32; + mod imports { + #[link(wasm_import_module = "wasi:http/types@0.3.0")] + unsafe extern "C" { + #[link_name = "[stream-new-0][static]request.new"] + pub(super) fn new() -> u64; + #[link_name = "[stream-cancel-write-0][static]request.new"] + pub(super) fn cancel_write(_: u32) -> u32; + #[link_name = "[stream-cancel-read-0][static]request.new"] + pub(super) fn cancel_read(_: u32) -> u32; + #[link_name = "[stream-drop-writable-0][static]request.new"] + pub(super) fn drop_writable(_: u32); + #[link_name = "[stream-drop-readable-0][static]request.new"] + pub(super) fn drop_readable(_: u32); + #[link_name = "[async-lower][stream-read-0][static]request.new"] + pub(super) fn start_read(_: u32, _: *mut u8, _: usize) -> u32; + #[link_name = "[async-lower][stream-write-0][static]request.new"] + pub(super) fn start_write(_: u32, _: *const u8, _: usize) -> u32; + } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn new() -> u64 { + unsafe { imports::new() } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_write(handle: u32) -> u32 { + unsafe { imports::cancel_write(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn cancel_read(handle: u32) -> u32 { + unsafe { imports::cancel_read(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_writable(handle: u32) { + unsafe { imports::drop_writable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn drop_readable(handle: u32) { + unsafe { imports::drop_readable(handle) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_read( + handle: u32, + ptr: *mut u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_read(handle, ptr, _extra) } + } + #[cfg(target_arch = "wasm32")] + unsafe extern "C" fn start_write( + handle: u32, + ptr: *const u8, + _extra: usize, + ) -> u32 { + unsafe { imports::start_write(handle, ptr, _extra) } } pub static VTABLE: wit_bindgen::rt::async_support::StreamVtable = wit_bindgen::rt::async_support::StreamVtable::< u8, @@ -7380,7 +7478,7 @@ macro_rules! __export_service_impl { exports::wasi::http::handler::__export_wasi_http_handler_0_3_0_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.61.0:wasi:http@0.3.0:service:imports and exportsrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-service-world")] + "component-type:wit-bindgen:0.62.0:wasi:http@0.3.0:service:imports and exportsrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-service-world")] #[doc(hidden)] #[allow(clippy::octal_escapes)] pub static __WIT_BINDGEN_COMPONENT_TYPE : [u8; 4995] = * b"\ @@ -7484,7 +7582,7 @@ nse\x03\0\x02\x02\x03\x02\x01\x0a\x04\0\x0aerror-code\x03\0\x04\x01i\x01\x01i\x0 \x01j\x01\x07\x01\x05\x01C\x01\x07request\x06\0\x08\x04\0\x06handle\x01\x09\x04\0\ \x17wasi:http/handler@0.3.0\x05\x11\x04\0\x17wasi:http/service@0.3.0\x04\0\x0b\x0d\ \x01\0\x07service\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-compone\ -nt\x070.258.0\x10wit-bindgen-rust\x060.61.0"; +nt\x070.259.0\x10wit-bindgen-rust\x060.62.0"; }; }; } @@ -7493,8 +7591,8 @@ pub use __export_service_impl as _export_service; #[rustfmt::skip] #[cfg(target_arch = "wasm32")] -#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:http@0.3.0:service-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-service-world-in-libstd"))] -#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.61.0:wasi:http@0.3.0:service-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.8.0+wasi-0.3.0-from-crates-io-service-world"))] +#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:http@0.3.0:service-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-service-world-in-libstd"))] +#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.62.0:wasi:http@0.3.0:service-with-all-of-its-exports-removed:encoded worldrust-wasip3-0.9.0+wasi-0.3.0-from-crates-io-service-world"))] #[doc(hidden)] #[allow(clippy::octal_escapes)] @@ -7596,7 +7694,7 @@ cure-random-bytes\x01\x01\x01@\0\0w\x04\0\x17get-insecure-random-u64\x01\x02\x03 get-insecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-seed@0.3.0\x05\x10\x04\0\ 7wasi:http/service-with-all-of-its-exports-removed@0.3.0\x04\0\x0b-\x01\0'servic\ e-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\ -\x0dwit-component\x070.258.0\x10wit-bindgen-rust\x060.61.0"; +\x0dwit-component\x070.259.0\x10wit-bindgen-rust\x060.62.0"; #[inline(never)] #[doc(hidden)] pub fn __link_custom_section_describing_imports() {