|
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6 |
|
| #
112112d4 |
| 11-Feb-2026 |
Alex Crichton <[email protected]> |
Yield instead of sleep in component-async-tests (#12567)
* Yield instead of sleep in component-async-tests
Use cooperative yields instead of sleeps to make tests more deterministic and also avoid t
Yield instead of sleep in component-async-tests (#12567)
* Yield instead of sleep in component-async-tests
Use cooperative yields instead of sleeps to make tests more deterministic and also avoid them unnecessarily taking up test parallelism by sleeping. Yielding should have the same effect in terms of testing by exercising behavior returning `Pending` in futures, so there's no expected loss in test coverage here.
* Yield fewer times
show more ...
|
|
Revision tags: v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0 |
|
| #
6ca03af1 |
| 15-Jan-2026 |
Joel Dice <[email protected]> |
make async tests using `ready` interface more robust (#12360)
This changes the `ready` interface used by `component-async-tests` from:
``` interface ready { // Set the `ready` state set-ready:
make async tests using `ready` interface more robust (#12360)
This changes the `ready` interface used by `component-async-tests` from:
``` interface ready { // Set the `ready` state set-ready: func(ready: bool); // Block until `ready` is `true` when-ready: async func(); } ``` to: ``` interface ready { resource thing { constructor(); set-ready: func(ready: bool); when-ready: async func(); } } ```
The problem with the original version was that it required global state and thus caused cross-talk across concurrent tasks. Due to implementation details inside Wasmtime, the tests worked anyway, but https://github.com/bytecodealliance/wasmtime/pull/12357 perturbed that and revealed how fragile tests based on that interface were.
The new version puts the state inside a resource type, allowing each task create its own instance of that resource type and thereby avoid crosstalk.
show more ...
|
|
Revision tags: v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1, v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0 |
|
| #
69b4acbf |
| 07-Aug-2025 |
Alex Crichton <[email protected]> |
Bump MSRV to Rust 1.87.0 (#11396)
* Bump MSRV to Rust 1.87.0
Coincides with today's release of Rust 1.89
* Fix some lint warnings
* Fix tests with Pulley
* Fix lldb tests
* Fix a doc test on 32
Bump MSRV to Rust 1.87.0 (#11396)
* Bump MSRV to Rust 1.87.0
Coincides with today's release of Rust 1.89
* Fix some lint warnings
* Fix tests with Pulley
* Fix lldb tests
* Fix a doc test on 32-bit
show more ...
|
| #
f7a5aa34 |
| 02-Aug-2025 |
Alex Crichton <[email protected]> |
Unify WASIp{2,3} context structures (#11370)
This removes `wasmtime_wasi::p{2,3}::{WasiCtx, WasiCtxBuilder, WasiView}` in favor of only having `wasmtime_wasi::{WasiCtx, WasiCtxBuilder, WasiView}` in
Unify WASIp{2,3} context structures (#11370)
This removes `wasmtime_wasi::p{2,3}::{WasiCtx, WasiCtxBuilder, WasiView}` in favor of only having `wasmtime_wasi::{WasiCtx, WasiCtxBuilder, WasiView}` instead. Conceptually these revisions of WASI all provide the same functionality just with a different veneer that the component model offers, so having only one way to configure host-side behavior will make it easier to both organize implementations internally (e.g. more sharing of code) as well as for embedders to configure (only one context to create/manage).
show more ...
|
| #
0a074afc |
| 01-Aug-2025 |
Alex Crichton <[email protected]> |
Simplify WASI internal implementations (#11365)
* Simplify WASI internal implementations
This commit migrates the WASIp2 implementation to be closer to the upcoming WASIp3 implementation in terms o
Simplify WASI internal implementations (#11365)
* Simplify WASI internal implementations
This commit migrates the WASIp2 implementation to be closer to the upcoming WASIp3 implementation in terms of how things are implemented internally. Previously the way things worked with WASIp2 is:
* Embedders call `add_to_linker` with `T: WasiView` * Internally `add_to_linker` is called which creates `WasiImpl<&mut T>` * All internal implementations were `impl<T> Host for WasiImpl<T> where T: WasiView` * A forwarding impl of `impl<T: WasiView> WasiView for &mut T` was required
While this all worked it's a bit complicated for a few reasons:
1. Dealing with generically named structures like `WasiImpl` (or `IoImpl` or `WasiHttpImpl`) is a bit baroque and not always obvious as to what's going on. 2. The extra layer of generics in `impl<T> Host for WasiImpl<T>` adds a layer of conceptual indirection which is non-obvious. 3. Other WASI proposal implementations do not use this strategy and instead use "view" types or `impl Host for TheType` for example. 4. Internal incantations of `add_to_linker` had to deal with mixtures of `IoImpl` and `WasiImpl` and aligning everything just right. 5. An extra layer of generics on all impls meant that everything was generic meaning that `wasmtime-wasi`-the-crate didn't generate much code, causing longer codegen times for consumers.
The goal of this commit is to migrate towards the style of what WASIp3 is prototyping for how impls are modeled. This is done to increase the amount of code that can be shared between WASIp2 and WASIp3. This has a number of benefits such as being easier to understand and also being more modular where `wasi:clocks` implementations of traits don't require filesystem context to be present (as is the case today). This in theory helps a more mix-and-match paradigm of blending together various bits and pieces of `wasmtime-wasi` implementations.
Concretely the changes made here are:
* `WasiView` no longer inherits from `IoView`, they're unrelated traits now. * `WasiView` now returns `WasiViewCtx<'a>` which has `ctx: &'a mut WasiCtx` and `table: &'a mut ResourceTable`. That means it basically does the same thing before but in a slightly different fashion. * Implementations of `Host` traits are now directly for `WasiCtxView<'_>` and don't involve any generics at all. These are hopefully easier to understand and also better from a codegen/compile-time perspective. * Embedders no longer need to implement `IoView` directly and instead fold that functionality into `WasiView`. * `WasiHttpView` no longer inherits from `IoView` and instead has a direct `fn table` method. Additionally `WasiHttpImpl` no longer embeds `IoImpl` inside of it. * Host traits for `wasi:io` are now implemented directly for `ResourceTable` instead of `IoImpl<T>`.
The immediate goal of this refactoring is to enable more sharing along the lines of #11362. This was not possible prior because WASIp3 requires a simultaneous borrow on the table/ctx while the trait hierarchy previously gave you one-or-the-other. With this new organization it will be possible to get both at the same time meaning more structure/contexts/etc can be shared between implementations.
prtest:full
* CI fixes
* More CI fixes
* More CI fixes
show more ...
|
|
Revision tags: v35.0.0, v24.0.4, v33.0.2, v34.0.2 |
|
| #
804060c8 |
| 11-Jul-2025 |
Joel Dice <[email protected]> |
add Component Model async ABI tests (#11136)
* add Component Model async ABI tests
This pulls in the tests from the `wasip3-prototyping` repo, minus the ones requiring WASIp3 support in `wasmtime-w
add Component Model async ABI tests (#11136)
* add Component Model async ABI tests
This pulls in the tests from the `wasip3-prototyping` repo, minus the ones requiring WASIp3 support in `wasmtime-wasi[-http]`, which will be PR'd separately.
* add audits and exemptions for new `component-async-tests` deps
In order to convince `cargo vet` that we only needed these deps to be `safe-to-run` (not necessarily `safe-to-deploy`, since it's test code), I've moved the `wasm-compose` dep to the `dev-dependencies` section of the `Cargo.toml` file, which required rearranging some code.
I've exempted `wasm-compose` since it's a BA project, and also exempted all but one of the remaining new deps since they each get well over 10,000 downloads per day from crates.io. I've audited and certified the remaining dep, `im-rc`, which came in a bit shy of the 10,000-per-day mark.
Signed-off-by: Joel Dice <[email protected]>
* simplify `component_async_tests::util::sleep`
Signed-off-by: Joel Dice <[email protected]>
---------
Signed-off-by: Joel Dice <[email protected]>
show more ...
|