Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
./ci/vendor-wit.sh
git diff --exit-code
- run: |
version=0.45.0
version=0.46.0

mkdir wit-bindgen
cd wit-bindgen
Expand Down
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasi"
version = "0.14.5+wasi-0.2.4"
version = "0.14.6+wasi-0.2.4"
description = "WASI API bindings for Rust"
categories = ["no-std", "wasm"]
keywords = ["webassembly", "wasm"]
Expand All @@ -19,11 +19,11 @@ rust-version = "1.82.0"

[workspace.dependencies]
rand = { version = "0.8.5", default-features = false }
wasi = { version = "0.14.4", path = ".", default-features = false }
wit-bindgen = { version = "0.45.0", default-features = false }
wasi = { version = "0.14.6", path = ".", default-features = false }
wit-bindgen = { version = "0.46.0", default-features = false }
wasip1 = { version = "1.0.0", path = "crates/wasip1", default-features = false }
wasip2 = { version = "1.0.0", path = "crates/wasip2", default-features = false }
wasip3 = { version = "0.1.0", path = "crates/wasip3", 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 }
core = { version = "1.0", package = "rustc-std-workspace-core" }
alloc = { version = "1.0", package = "rustc-std-workspace-alloc" }

Expand Down
19 changes: 13 additions & 6 deletions ci/regenerate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -ex

suffix() {
name="$1"
extra="$2"
cargo metadata | jq -r \
".packages.[] | select(.name==\"${name}\") | (\"rust-\" + .name + \"-\" + .version + \"-from-crates-io${extra}\")"
}

generate() {
file="$1"
shift
Expand All @@ -25,7 +32,7 @@ generate_p2() {
# Generate the main body of the bindings which includes all imports from the two
# worlds below.
generate_p2 crates/wasip2/src/imports.rs \
--type-section-suffix rust-wasi-from-crates-io \
--type-section-suffix $(suffix "wasip2") \
--generate-all \
--world wasi:cli/imports

Expand Down Expand Up @@ -63,7 +70,7 @@ with="$with,wasi:sockets/ip-name-lookup@0.2.4=crate::sockets::ip_name_lookup"
generate_p2 crates/wasip2/src/command.rs \
--world wasi:cli/command \
--with "$with" \
--type-section-suffix rust-wasi-from-crates-io-command-world \
--type-section-suffix $(suffix "wasip2" "-command-world") \
--default-bindings-module '$crate' \
--pub-export-macro \
--export-macro-name _export_command
Expand All @@ -81,7 +88,7 @@ with="$with,wasi:random/random@0.2.4=crate::random::random"
generate_p2 crates/wasip2/src/proxy.rs \
--world wasi:http/proxy \
--with "$with" \
--type-section-suffix rust-wasi-from-crates-io-proxy-world \
--type-section-suffix $(suffix "wasip2" "-proxy-world") \
--default-bindings-module '$crate' \
--pub-export-macro \
--export-macro-name _export_proxy
Expand All @@ -94,7 +101,7 @@ generate_p3() {
}

generate_p3 crates/wasip3/src/imports.rs \
--type-section-suffix rust-wasi-from-crates-io \
--type-section-suffix $(suffix "wasip3") \
--generate-all \
--world wasi:cli/imports

Expand All @@ -120,7 +127,7 @@ with="$with,wasi:sockets/ip-name-lookup@0.3.0-rc-2025-08-15=crate::sockets::ip_n
generate_p3 crates/wasip3/src/command.rs \
--world wasi:cli/command \
--with "$with" \
--type-section-suffix rust-wasi-from-crates-io-command-world \
--type-section-suffix $(suffix "wasip3" "-command-world") \
--default-bindings-module '$crate' \
--pub-export-macro \
--async 'wasi:cli/run@0.3.0-rc-2025-08-15#run' \
Expand All @@ -135,7 +142,7 @@ with="$with,wasi:random/random@0.3.0-rc-2025-08-15=crate::random::random"
generate_p3 crates/wasip3/src/proxy.rs \
--world wasi:http/proxy \
--with "$with" \
--type-section-suffix rust-wasi-from-crates-io-proxy-world \
--type-section-suffix $(suffix "wasip3" "-proxy-world") \
--default-bindings-module '$crate' \
--pub-export-macro \
--export-macro-name _export_proxy
2 changes: 1 addition & 1 deletion crates/wasip2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasip2"
version = "1.0.0+wasi-0.2.4"
version = "1.0.1+wasi-0.2.4"
description = "WASIp2 API bindings for Rust"
categories = ["no-std", "wasm"]
keywords = ["webassembly", "wasm"]
Expand Down
43 changes: 35 additions & 8 deletions crates/wasip2/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen` 0.45.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.46.0. DO NOT EDIT!
// Options used:
// * std_feature
// * with "wasi:cli/environment@0.2.4" = "crate::cli::environment"
Expand Down Expand Up @@ -28,36 +28,63 @@
// * with "wasi:sockets/udp@0.2.4" = "crate::sockets::udp"
// * with "wasi:sockets/udp-create-socket@0.2.4" = "crate::sockets::udp_create_socket"
// * with "wasi:sockets/ip-name-lookup@0.2.4" = "crate::sockets::ip_name_lookup"
// * type_section_suffix: "rust-wasi-from-crates-io-command-world"
// * type_section_suffix: "rust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-command-world"
// * default-bindings-module: "$crate"
// * export-macro-name: _export_command
// * pub-export-macro
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::environment as __with_name0;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::exit as __with_name1;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::io::error as __with_name2;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::io::poll as __with_name3;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::io::streams as __with_name4;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::stdin as __with_name5;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::stdout as __with_name6;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::stderr as __with_name7;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::terminal_input as __with_name8;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::terminal_output as __with_name9;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::terminal_stdin as __with_name10;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::terminal_stdout as __with_name11;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::terminal_stderr as __with_name12;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::clocks::monotonic_clock as __with_name13;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::clocks::wall_clock as __with_name14;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::filesystem::types as __with_name15;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::filesystem::preopens as __with_name16;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::network as __with_name17;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::instance_network as __with_name18;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::udp as __with_name19;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::udp_create_socket as __with_name20;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::tcp as __with_name21;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::tcp_create_socket as __with_name22;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::sockets::ip_name_lookup as __with_name23;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::random::random as __with_name24;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::random::insecure as __with_name25;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::random::insecure_seed as __with_name26;
#[rustfmt::skip]
#[allow(dead_code, clippy::all)]
Expand Down Expand Up @@ -140,7 +167,7 @@ macro_rules! __export_command_impl {
exports::wasi::cli::run::__export_wasi_cli_run_0_2_4_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.45.0:wasi:cli@0.2.4:command:imports and exportsrust-wasi-from-crates-io-command-world")]
"component-type:wit-bindgen:0.46.0:wasi:cli@0.2.4:command:imports and exportsrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-command-world")]
#[doc(hidden)] #[allow(clippy::octal_escapes)] pub static
__WIT_BINDGEN_COMPONENT_TYPE : [u8; 10773] = *
b"\
Expand Down Expand Up @@ -360,8 +387,8 @@ nsecure-random-u64\x01\x02\x03\0\x1awasi:random/insecure@0.2.4\x05*\x01B\x03\x01
o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-\
seed@0.2.4\x05+\x01B\x03\x01j\0\0\x01@\0\0\0\x04\0\x03run\x01\x01\x04\0\x12wasi:\
cli/run@0.2.4\x05,\x04\0\x16wasi:cli/command@0.2.4\x04\0\x0b\x0d\x01\0\x07comman\
d\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.238.0\x10\
wit-bindgen-rust\x060.45.0";
d\x03\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.239.0\x10\
wit-bindgen-rust\x060.46.0";
};
};
}
Expand All @@ -370,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.45.0:wasi:cli@0.2.4:command-with-all-of-its-exports-removed:encoded worldrust-wasi-from-crates-io-command-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.45.0:wasi:cli@0.2.4:command-with-all-of-its-exports-removed:encoded worldrust-wasi-from-crates-io-command-world"))]
#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.46.0:wasi:cli@0.2.4:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-command-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.46.0:wasi:cli@0.2.4:command-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-command-world"))]

#[doc(hidden)]
#[allow(clippy::octal_escapes)]
Expand Down Expand Up @@ -592,7 +619,7 @@ nsecure-random-u64\x01\x02\x03\0\x1awasi:random/insecure@0.2.4\x05*\x01B\x03\x01
o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-\
seed@0.2.4\x05+\x04\06wasi:cli/command-with-all-of-its-exports-removed@0.2.4\x04\
\0\x0b-\x01\0'command-with-all-of-its-exports-removed\x03\0\0\0G\x09producers\x01\
\x0cprocessed-by\x02\x0dwit-component\x070.238.0\x10wit-bindgen-rust\x060.45.0";
\x0cprocessed-by\x02\x0dwit-component\x070.239.0\x10wit-bindgen-rust\x060.46.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
12 changes: 6 additions & 6 deletions crates/wasip2/src/imports.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Generated by `wit-bindgen` 0.45.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.46.0. DO NOT EDIT!
// Options used:
// * std_feature
// * type_section_suffix: "rust-wasi-from-crates-io"
// * type_section_suffix: "rust-wasip2-1.0.1+wasi-0.2.4-from-crates-io"
#[rustfmt::skip]
#[allow(dead_code, clippy::all)]
pub mod wasi {
Expand Down Expand Up @@ -10008,8 +10008,8 @@ mod _rt {
#[rustfmt::skip]
#[cfg(target_arch = "wasm32")]

#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.45.0:wasi:cli@0.2.4:imports:encoded worldrust-wasi-from-crates-io-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.45.0:wasi:cli@0.2.4:imports:encoded worldrust-wasi-from-crates-io"))]
#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.46.0:wasi:cli@0.2.4:imports:encoded worldrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.46.0:wasi:cli@0.2.4:imports:encoded worldrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io"))]

#[doc(hidden)]
#[allow(clippy::octal_escapes)]
Expand Down Expand Up @@ -10229,8 +10229,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.4\x05*\x01B\x03\x01\
o\x02ww\x01@\0\0\0\x04\0\x0dinsecure-seed\x01\x01\x03\0\x1fwasi:random/insecure-\
seed@0.2.4\x05+\x04\0\x16wasi:cli/imports@0.2.4\x04\0\x0b\x0d\x01\0\x07imports\x03\
\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.238.0\x10wit-\
bindgen-rust\x060.45.0";
\0\0\0G\x09producers\x01\x0cprocessed-by\x02\x0dwit-component\x070.239.0\x10wit-\
bindgen-rust\x060.46.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
23 changes: 16 additions & 7 deletions crates/wasip2/src/proxy.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen` 0.45.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.46.0. DO NOT EDIT!
// Options used:
// * std_feature
// * with "wasi:cli/stdin@0.2.4" = "crate::cli::stdin"
Expand All @@ -10,18 +10,27 @@
// * with "wasi:io/poll@0.2.4" = "crate::io::poll"
// * with "wasi:io/streams@0.2.4" = "crate::io::streams"
// * with "wasi:random/random@0.2.4" = "crate::random::random"
// * type_section_suffix: "rust-wasi-from-crates-io-proxy-world"
// * type_section_suffix: "rust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-proxy-world"
// * default-bindings-module: "$crate"
// * export-macro-name: _export_proxy
// * pub-export-macro
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::io::poll as __with_name0;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::clocks::monotonic_clock as __with_name1;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::clocks::wall_clock as __with_name2;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::random::random as __with_name3;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::io::error as __with_name4;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::io::streams as __with_name5;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::stdout as __with_name6;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::stderr as __with_name7;
#[allow(unfulfilled_lint_expectations, unused_imports)]
use crate::cli::stdin as __with_name8;
#[rustfmt::skip]
#[allow(dead_code, clippy::all)]
Expand Down Expand Up @@ -7134,7 +7143,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.45.0:wasi:http@0.2.4:proxy:imports and exportsrust-wasi-from-crates-io-proxy-world")]
"component-type:wit-bindgen:0.46.0:wasi:http@0.2.4:proxy:imports and exportsrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-proxy-world")]
#[doc(hidden)] #[allow(clippy::octal_escapes)] pub static
__WIT_BINDGEN_COMPONENT_TYPE : [u8; 7040] = *
b"\
Expand Down Expand Up @@ -7278,7 +7287,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.4\x05\x16\x04\0\x15\
wasi:http/proxy@0.2.4\x04\0\x0b\x0b\x01\0\x05proxy\x03\0\0\0G\x09producers\x01\x0c\
processed-by\x02\x0dwit-component\x070.238.0\x10wit-bindgen-rust\x060.45.0";
processed-by\x02\x0dwit-component\x070.239.0\x10wit-bindgen-rust\x060.46.0";
};
};
}
Expand All @@ -7287,8 +7296,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.45.0:wasi:http@0.2.4:proxy-with-all-of-its-exports-removed:encoded worldrust-wasi-from-crates-io-proxy-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.45.0:wasi:http@0.2.4:proxy-with-all-of-its-exports-removed:encoded worldrust-wasi-from-crates-io-proxy-world"))]
#[cfg_attr(feature = "rustc-dep-of-std", unsafe(link_section = "component-type:wit-bindgen:0.46.0:wasi:http@0.2.4:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-proxy-world-in-libstd"))]
#[cfg_attr(not(feature = "rustc-dep-of-std"), unsafe(link_section = "component-type:wit-bindgen:0.46.0:wasi:http@0.2.4:proxy-with-all-of-its-exports-removed:encoded worldrust-wasip2-1.0.1+wasi-0.2.4-from-crates-io-proxy-world"))]

#[doc(hidden)]
#[allow(clippy::octal_escapes)]
Expand Down Expand Up @@ -7430,7 +7439,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.4\x05\x13\x04\05wasi:http\
/proxy-with-all-of-its-exports-removed@0.2.4\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.238.0\x10wit-bindgen-rust\x060.45.0";
nent\x070.239.0\x10wit-bindgen-rust\x060.46.0";
#[inline(never)]
#[doc(hidden)]
pub fn __link_custom_section_describing_imports() {
Expand Down
2 changes: 1 addition & 1 deletion crates/wasip3/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasip3"
version = "0.1.0+wasi-0.3.0-rc-2025-08-15"
version = "0.1.1+wasi-0.3.0-rc-2025-08-15"
description = "WASIp3 API bindings for Rust"
categories = ["no-std", "wasm"]
keywords = ["webassembly", "wasm"]
Expand Down
Loading