Skip to content

Conversation

@yoshuawuyts
Copy link
Member

@yoshuawuyts yoshuawuyts commented Nov 25, 2025

This is the first step in bringing all the proposals into a single repository, AKA creating a WASI monorepo. This was done in a similar way to bytecodealliance/wasmtime#11815 using the git-filter-repo command.

We've opted to follow a structure similar to webassembly/spec, bringing all phase 3 proposals under the proposals/ sub-directory. In a follow-up PR we will mark these proposals with code owners and do additional cleanup work. For now this PR only brings in the sub-directories (modulo .github CI flows).

Thanks!

rvolosatovs and others added 30 commits February 4, 2025 09:48
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
* feat: add `wasi-0.3.0` draft

Followed the example of `wasi-http` and `wasi-clocks` duplicating the
package in a subdirectory

- Remove `would-block` error code
- Replace `wasi:io/error.error` usage by `error-context`
- Replace `wasi:io/streams.input-stream` return values by `stream<u8>`
  in return position
- Replace `wasi:io/streams.output-stream` return values by `stream<u8>`
  in parameter position
     - Guests should be able to rely on `stream.new` to construct
       streams
- Merge `read{,via-stream}` into a singular `read`. Both functions take
  an offset as a parameter and since they now return `stream<u8>`,
  callers can limit the amount of bytes read by using the `stream<u8>`
  directly, therefore functionality of both is identical
- Merge `write{,via-stream}` into a singular `write`. Both functions take
  an offset and `stream<u8>` as a parameter.

It is assumed that `error-context` returned by writes to the stream and
reads from the stream are sufficient for error handling.

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* refactor: avoid introspecting `error-context`

This seems to be better aligned with latest specification on error context

https://github.com/WebAssembly/component-model/blob/cbdd15d9033446558571824af52a78022aaa3f58/design/mvp/Explainer.md#error-context-type

> A consequence of this, however, is that components *must not* depend on the
> contents of `error-context` values for behavioral correctness. In particular,
> case analysis of the contents of an `error-context` should not determine
> *error recovery*; explicit `result` or `variant` types must be used in the
> function return type instead (e.g.,
> `(func (result (tuple (stream u8) (future $my-error)))`).

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* chore: bump `@since` to `0.3.0`

WebAssembly/wasi-filesystem#164 (comment)

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* refactor(0.3): simplify error handling

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* refactor(0.3): asyncify `read-directory`

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* feat: update wit-deps to 0.5.0

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

* drop `-draft` version suffix

This ensures that e.g.:

```
wit-bindgen markdown wit-0.3.0-draft -w imports --html-in-md
```

works with wit-bindgen 0.37

refs:
WebAssembly/wasi-sockets@3abda6e

refs:
WebAssembly/wasi-sockets#111 (comment)

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>

---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
* Document the `link` function's error conditions.

Document that `link` fails if old-path doesn't exist or isn't a file,
or if new-path already exists.

* Autogenerate imports.md.
Port the documentation of the `link` function's error conditions added
in #165 to the wit-0.3.0-draft branch.
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Automate publishing and signing of Wasm Components
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Use a differently named release branch from tag.
ricochet and others added 25 commits October 7, 2025 11:25
- Add a `client` interface with a `send` function matching `handle`
- Replace the `imports` world's `handler` import with `client`
- Replace the `proxy` world with `service`
- Add a `middleware` world
Co-authored-by: Luke Wagner <mail@lukewagner.name>
Say:
```
wasi:io/streams.stream-error
```
instead of:
```
wasi:io/streams/stream-error
```

This better aligns with WIT's `use` syntax and the upcoming nested
namespaces feature in WIT.
Say:
```
wasi:io/streams.stream-error
```
instead of:
```
wasi:io/streams/stream-error
```

This better aligns with WIT's `use` syntax and the upcoming nested
namespaces feature in WIT.
This switches `wasi:http/proxy` from just using `wasi:random/random` to
also including `wasi:random/insecure` and `wasi:random/insecure-seed`.

These "insecure" interfaces allow applications which need random numbers
for purposes other than cryptography or UUIDs to request them, which can
give hosts more flexibility when running in environments with scarce
entropy, such as early boot environments.

These interfaces should be easy to support in any host that already
supports `wasi:random/random`. They permit alternate implementation
strategies, but don't require them.
@yoshuawuyts yoshuawuyts marked this pull request as ready for review November 25, 2025 14:53
@yoshuawuyts yoshuawuyts merged commit 75d259d into WebAssembly:main Nov 25, 2025
@programmerjake

This comment was marked as resolved.

@yoshuawuyts yoshuawuyts deleted the migrate-io branch November 26, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.