|
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, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2 |
|
| #
d73bd632 |
| 09-Jan-2026 |
Nick Fitzgerald <[email protected]> |
Migrate `wasmtime-wasi` to `wasmtime::error` (#12294)
* Migrate wiggle and wiggle generate to `wasmtime::error`
* Fix testing `wiggle` and `wiggle-test` in isolation
When doing plain old `cargo te
Migrate `wasmtime-wasi` to `wasmtime::error` (#12294)
* Migrate wiggle and wiggle generate to `wasmtime::error`
* Fix testing `wiggle` and `wiggle-test` in isolation
When doing plain old `cargo test -p wiggle` (or `wiggle-test`) the test would fail due to linking errors because Wasmtime's `std` cargo feature (and maybe others) wasn't being enabled. The crate's tests would pass when run as part of the whole workspace, however, because of cargo feature resolution and other crates that enabled the necessary features, which is why CI is green.
* Remove direct anyhow dependency in wiggle-test
* Migrate wasi-nn to `wasmtime::error`
* Migrate wasi-keyvalue to `wasmtime::error`
* Migrate wasi-io to `wasmtime::error`
* Migrate wasi-http to `wasmtime::error`
* Migrate wasi-config to `wasmtime::error`
* Migrate wasi-common to `wastime::error`
This is another interesting one because wasi-common is used internally to Wasmtime but also by other projects. Therefore, rather than using `wastime::error::*` and making `wasmtime` a hard dependency, we use just `wasmtime_environ::error`.
* cargo fmt
* Migrate wasmtime-wasi to `wasmtime::error`
show more ...
|
|
Revision tags: 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 |
|
| #
d5262995 |
| 05-Aug-2025 |
Alex Crichton <[email protected]> |
Mirror WASIp{2,3} sockets implementations (#11379)
This is an implementation of #11362 but for the `wasi:sockets` implementation of WASIp2. This additionally internalizes much of the WASIp3 implemen
Mirror WASIp{2,3} sockets implementations (#11379)
This is an implementation of #11362 but for the `wasi:sockets` implementation of WASIp2. This additionally internalizes much of the WASIp3 implementation with `pub(crate)` to avoid unnecessarily exposing implementation details of the crate.
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 ...
|
| #
7074afb6 |
| 29-Jul-2025 |
Roman Volosatovs <[email protected]> |
feat(wasip3): implement `wasi:sockets` (#11291)
* chore(wasip3): update `wasi:sockets` WIT
pull in `wasi:sockets` from https://github.com/WebAssembly/wasi-sockets/pull/126
Signed-off-by: Roman Vol
feat(wasip3): implement `wasi:sockets` (#11291)
* chore(wasip3): update `wasi:sockets` WIT
pull in `wasi:sockets` from https://github.com/WebAssembly/wasi-sockets/pull/126
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: rearrange Ctx/View
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: name modules after packages
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: move `Network` to `p2`
Signed-off-by: Roman Volosatovs <[email protected]>
* feat(wasip3): implement `wasi:sockets`
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: reuse socket utilities
Signed-off-by: Roman Volosatovs <[email protected]>
* test(wasip3): allow name resolution to fail
Signed-off-by: Roman Volosatovs <[email protected]>
* fix: expect macos-only var to be unused on other OSes
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: whole buffer is written for UDP
Signed-off-by: Roman Volosatovs <[email protected]>
* undo non-blocking write
Signed-off-by: Roman Volosatovs <[email protected]>
* extract buf capacity const, refactor tcp receive
Signed-off-by: Roman Volosatovs <[email protected]>
* introduce container struct for TCP non-inherited opts
Signed-off-by: Roman Volosatovs <[email protected]>
* handle `listen` receiver close
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: clean up
Signed-off-by: Roman Volosatovs <[email protected]>
* adapt to API changes
prtest:full
Signed-off-by: Roman Volosatovs <[email protected]>
* refactor: check for listen receiver close each iteration
Signed-off-by: Roman Volosatovs <[email protected]>
* Try to make test less flaky
* Cut down on `#[cfg]` required for wasi:sockets
* Fix test for real this time
---------
Signed-off-by: Roman Volosatovs <[email protected]> Co-authored-by: Alex Crichton <[email protected]>
show more ...
|
|
Revision tags: v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0, v32.0.0 |
|
| #
73992063 |
| 15-Apr-2025 |
Roman Volosatovs <[email protected]> |
refactor: move wasip2 implementation to `wasmtime_wasi::p2` (#10073)
* refactor: move `wasmtime-wasi` p2-specific functionality to `p2`
Signed-off-by: Roman Volosatovs <[email protected]>
* d
refactor: move wasip2 implementation to `wasmtime_wasi::p2` (#10073)
* refactor: move `wasmtime-wasi` p2-specific functionality to `p2`
Signed-off-by: Roman Volosatovs <[email protected]>
* doc: move some of the p2 comments to top-level
Signed-off-by: Roman Volosatovs <[email protected]>
* chore: shorten `network` and `filesystem` module names
Signed-off-by: Roman Volosatovs <[email protected]>
---------
Signed-off-by: Roman Volosatovs <[email protected]>
show more ...
|