Stream: git-wasmtime

Topic: wasmtime / PR #12250 feat(p3)!: vendor 0.3.0-rc-2026-01-06


view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:17):

ricochet opened PR #12250 from ricochet:p3-rc-01-6 to bytecodealliance:main:

Update wasmtime's WASI implementation from version
0.3.0-rc-2025-09-16 to 0.3.0-rc-2026-01-06, using wkg for WIT vendoring.

This involves API changes in clocks and HTTP.

By using wkg here, we are also now pointing at the WASI monorepo (closes #9419).

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:17):

ricochet requested wasmtime-wasi-reviewers for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:17):

ricochet requested fitzgen for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:17):

ricochet requested wasmtime-core-reviewers for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:17):

ricochet requested wasmtime-default-reviewers for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:29):

ricochet updated PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:44):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:44):

alexcrichton created PR review comment:

If you'd like, an output file of $path/$pkg_name.wit would also work to avoid the $pkg_name/$pkg_name

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:44):

alexcrichton created PR review comment:

This top-level of addition of a wit directory might be accidental?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:44):

alexcrichton created PR review comment:

How come here (and a number of other locations in this PR) are now specifying features? Would it be possible to omit them?

The annotations in the adapter, for example, I think are load bearing in the sense that we don't want to activate them there ideally.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:44):

alexcrichton created PR review comment:

Was this a stray addition? Most of the other folders don't have wkg.lock and given that we're already pinning versions I'd imagine that we could probably eschew having this entirely, but I'm also not too too familiar with wkg.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 19:44):

alexcrichton requested alexcrichton for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:01):

ricochet submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:01):

ricochet created PR review comment:

I think generally wkg.lock should always be included like a Cargo.lock. We could add a gitignore but when running wkg and the vendor step it will always create this.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:16):

ricochet submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:16):

ricochet created PR review comment:

I may need some help diagnosing. It seems like bindgen here is either configured for all features or previously relied on not receiving wit with unstable.

When not specifying features:

cargo test --package wasmtime-wasi --test all -- p2_api_reactor
   Compiling test-programs-artifacts v0.0.0 (/Users/bhayes/repos/bytecodealliance/wasmtime/crates/test-programs/artifacts)
error: failed to run custom build command for `test-programs-artifacts v0.0.0 (/Users/bhayes/repos/bytecodealliance/wasmtime/crates/test-programs/artifacts)`

Caused by:
  process didn't exit successfully: `/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-09b249d84a25b153/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/cli.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/clocks.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/filesystem.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/io.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/random.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/sockets.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/test.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/world.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter/build.rs
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter/byte-array-literals/src/lib.rs
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter/src/descriptors.rs
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter/src/lib.rs
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter/src/macros.rs
  wasi reactor adapter: "/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out/wasi_snapshot_preview1.reactor.wasm"
  wasi command adapter: "/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out/wasi_snapshot_preview1.command.wasm"
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/cli.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/clocks.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/filesystem.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/http.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/io.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/random.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/deps/sockets.wit
  cargo:rerun-if-changed=/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-http/wit/world.wit
  wasi proxy adapter: "/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out/wasi_snapshot_preview1.proxy.wasm"
  cargo:rerun-if-env-changed=MIRI_TEST_CWASM_DIR

  --- stderr
  running: env -u CARGO_ENCODED_RUSTFLAGS CARGO_TARGET_DIR="/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out" RUSTFLAGS="" "cargo" "build" "--release" "--package=wasi-preview1-component-adapter" "--target=wasm32-unknown-unknown"
     Compiling wasi-preview1-component-adapter v41.0.0 (/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter)
      Finished `release` profile [optimized] target(s) in 1.10s
  running: env -u CARGO_ENCODED_RUSTFLAGS CARGO_TARGET_DIR="/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out" RUSTFLAGS="" "cargo" "build" "--release" "--package=wasi-preview1-component-adapter" "--target=wasm32-unknown-unknown" "--no-default-features" "--features=command"
     Compiling wasi-preview1-component-adapter v41.0.0 (/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter)
      Finished `release` profile [optimized] target(s) in 0.93s
  running: env -u CARGO_ENCODED_RUSTFLAGS CARGO_TARGET_DIR="/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out" RUSTFLAGS="" "cargo" "build" "--release" "--package=wasi-preview1-component-adapter" "--target=wasm32-unknown-unknown" "--no-default-features" "--features=proxy"
     Compiling wasi-preview1-component-adapter v41.0.0 (/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi-preview1-component-adapter)
      Finished `release` profile [optimized] target(s) in 0.40s
  running: env -u CARGO_ENCODED_RUSTFLAGS CARGO_PROFILE_DEV_DEBUG="2" CARGO_TARGET_DIR="/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out" RUSTFLAGS="" "cargo" "build" "--target=wasm32-wasip1" "--package=test-programs"
     Compiling test-programs v0.0.0 (/Users/bhayes/repos/bytecodealliance/wasmtime/crates/test-programs)
  error: failed to resolve directory while parsing WIT for path [/Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit]

         Caused by:
           interface not found in package
              --> /Users/bhayes/repos/bytecodealliance/wasmtime/crates/wasi/src/p2/wit/deps/cli.wit:174:22
               |
           174 |   import wasi:clocks/timezone@0.2.6;
               |                      ^-------
   --> crates/test-programs/src/bin/p2_api_reactor.rs:3:1
    |
  3 | / wit_bindgen::generate!({
  4 | |     world: "test-reactor",
  5 | |     path: "../wasi/src/p2/wit",
  6 | |     generate_all,
  7 | | });
    | |__^
    |
    = note: this error originates in the macro `wit_bindgen::generate` (in Nightly builds, run with -Z macro-backtrace for more info)

  error: cannot find macro `export` in this scope
    --> crates/test-programs/src/bin/p2_api_reactor.rs:11:1
     |
  11 | export!(T);
     | ^^^^^^

  error[E0405]: cannot find trait `Guest` in this scope
    --> crates/test-programs/src/bin/p2_api_reactor.rs:18:6
     |
  18 | impl Guest for T {
     |      ^^^^^ not found in this scope
     |
  help: consider importing one of these traits
     |
   1 + use test_programs::p3::exports::wasi::cli::run::Guest;
     |
   1 + use test_programs::p3::proxy::exports::wasi::http::handler::Guest;
     |
   1 + use test_programs::proxy::exports::wasi::http::incoming_handler::Guest;
     |
   1 + use wasip2::exports::cli::run::Guest;
     |
     = and 1 other candidate

  error[E0412]: cannot find type `OutputStream` in this scope
    --> crates/test-programs/src/bin/p2_api_reactor.rs:36:28
     |
  36 |     fn write_strings_to(o: OutputStream) -> Result<(), ()> {
     |                            ^^^^^^^^^^^^ not found in this scope
     |
  help: consider importing one of these items
     |
   1 + use test_programs::wasi::cli::stderr::OutputStream;
     |
   1 + use test_programs::wasi::cli::stdout::OutputStream;
     |
   1 + use test_programs::wasi::filesystem::types::OutputStream;
     |
   1 + use test_programs::wasi::http::types::OutputStream;
     |
     = and 9 other candidates

  error[E0433]: failed to resolve: use of unresolved module or unlinked crate `wasi`
    --> crates/test-programs/src/bin/p2_api_reactor.rs:67:38
     |
  67 |     fn pass_an_imported_record(stat: wasi::filesystem::types::DescriptorStat) -> String {
     |                                      ^^^^ use of unresolved module or unlinked crate `wasi`
     |
     = help: if you wanted to use a crate named `wasi`, use `cargo add wasi` to add it to your `Cargo.toml`
  help: consider importing one of these modules
     |
   1 + use test_programs::p3::wasi::filesystem::types;
     |
   1 + use test_programs::wasi::filesystem::types;
     |
   1 + use wasip2::filesystem::types;
     |
  help: if you import `types`, refer to it directly
     |
  67 -     fn pass_an_imported_record(stat: wasi::filesystem::types::DescriptorStat) -> String {
  67 +     fn pass_an_imported_record(stat: types::DescriptorStat) -> String {
     |

  Some errors have detailed explanations: E0405, E0412, E0433.
  For more information about an error, try `rustc --explain E0405`.
  error: could not compile `test-programs` (bin "p2_api_reactor") due to 5 previous errors

  thread 'main' (480942390) panicked at crates/test-programs/artifacts/build.rs:156:9:
  assertion failed: status.success()
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

With just the clocks-timezone feature:

  creating a component from "/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out/wasm32-wasip1/debug/p2_api_reactor.wasm"

  --- stderr
  running: env -u CARGO_ENCODED_RUSTFLAGS CARGO_TARGET_DIR="/Users/bhayes/repos/bytecodealliance/wasmtime/target/debug/build/test-programs-artifacts-eba4d8530bb0b1ec/out" RUSTFLAGS="" "cargo" "build" "--release" "--package=wasi-preview1-component-adapter" "--target=wasm32-unknown-unknown"
     Compiling wasi-preview1-co
[message truncated]

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:20):

ricochet updated PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:26):

ricochet created PR review comment:

Thanks that deletes a line too :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 18:26):

ricochet submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2026 at 19:00):

ricochet updated PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2026 at 16:40):

alexcrichton created PR review comment:

Ah ok this specific location I think is ok to keep the features enabled since it's just related to testing, but there's some other locations that I was curious about too:

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2026 at 16:40):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2026 at 16:41):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 09 2026 at 16:41):

alexcrichton created PR review comment:

Would it be possible to switch to wkg in a separate PR maybe? This is for example both updating WITs and switching to wkg, but ideally we'd do those as two discrete steps to ensure everything stays in sync and nothing slips through the cracks

view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2026 at 23:43):

alexcrichton commented on PR #12250:

I did some splicing/editing/editorializing in https://github.com/bytecodealliance/wasmtime/pull/12327. I'm happy to land that (tried to make sure to perserve your authorship) but if you'd prefer to morph those changes back in here I'm happy to merge this as well. Whatever's easiest for you, let me know!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 16:00):

alexcrichton updated PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 16:01):

alexcrichton commented on PR #12250:

If you don't mind @ricochet I did some merging/rebasing of this after #12327 landed and I've also handled some other thoughts I had related to the i64 switch for datetime.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 16:05):

alexcrichton commented on PR #12250:

Assuming @ricochet is ok with the changes I've made here, @pchickey would you also be ok for reviewing the changes I made? I don't want to self-approve my changes related to clocks.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 16:56):

ricochet submitted PR review:

I debated making the as change myself since without that fix, we risk the conversion of seconds as i64 to silently truncate values, and a potential overflow in system_clock::Instant conversion.

Body of the changes LGTM although I see CI is failing.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 19:42):

alexcrichton updated PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 19:45):

alexcrichton requested pchickey for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 20:00):

alexcrichton commented on PR #12250:

Actually, apologies for the notification overload Pat, I realized that due to the WASIp3 adjacent things @dicej would be a good candidate too, so I'm going to switch to Joel to confirm I didn't get anything wrong here

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 20:00):

alexcrichton requested dicej for a review on PR #12250.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 20:13):

dicej submitted PR review:

LGTM; just one question inline.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 20:13):

dicej created PR review comment:

What's the reason for generating the bindings locally here? I.e. what changed such that using the bindings generated in test_programs/src/p3/mod.rs is no longer feasible?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 22:47):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 22:47):

alexcrichton created PR review comment:

Ah I tried that initially but it's a wit-bindgen bug. The way the exported macros are generated, namespaced, etc, means that you can't generate, even in separate modules in the same crate, two worlds where the worlds overlap in exports. The middleware/service worlds overlap in their export of wasi:http/handler meaning that putting the two in the same crate would clash. I'll file a bug over on the wit-bindgen side of things for this.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 22:53):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 22:53):

alexcrichton created PR review comment:

Specifically, this issue

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2026 at 23:21):

alexcrichton merged PR #12250.


Last updated: Feb 24 2026 at 05:28 UTC