Stream: git-wasmtime

Topic: wasmtime / PR #14520 wasi:io: enforce the check-write per...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 08:52):

xia-chao opened PR #14520 from xia-chao:wasi-write-permit-complete to bytecodealliance:main:

A stream has to trap when you write more than check-write allowed. Three don't:

They hand back a number and then take anything. All three always give the same number, so one
check is enough. Spec: io.wit.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 08:52):

xia-chao requested pchickey for a review on PR #14520.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 08:52):

xia-chao requested wasmtime-wasi-reviewers for a review on PR #14520.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 08:52):

xia-chao requested wasmtime-core-reviewers for a review on PR #14520.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 08:57):

xia-chao edited PR #14520:

A stream has to trap when you write more than check-write allowed. Three don't:

SinkOutputStream — a guest's stdout with -Sinherit-stdout=n:
https://github.com/.../crates/wasi/src/p2/pipe.rs#L277-L290

OutputFile:
https://github.com/.../crates/wasi/src/cli/file.rs#L49-L65

CustomOutputStream:
https://github.com/.../crates/c-api/src/wasi.rs#L212-L233

They hand back a number and then take anything. All three always give the same number, so one check is enough.

Spec:
https://github.com/.../crates/wasi-io/wit/deps/io.wit#L184-L204

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 08:59):

xia-chao edited PR #14520:

A stream has to trap when you write more than check-write allowed. Three don't:

SinkOutputStream — a guest's stdout with -Sinherit-stdout=n:
https://github.com/bytecodealliance/wasmtime/blob/4b3cef0268cf52a079e07f1d39327121c13561a2/crates/wasi/src/p2/pipe.rs#L277-L290

OutputFile:
https://github.com/bytecodealliance/wasmtime/blob/4b3cef0268cf52a079e07f1d39327121c13561a2/crates/wasi/src/cli/file.rs#L49-L65

CustomOutputStream:
https://github.com/bytecodealliance/wasmtime/blob/4b3cef0268cf52a079e07f1d39327121c13561a2/crates/c-api/src/wasi.rs#L212-L233

They hand back a number and then take anything. All three always give the same number, so one check is enough.

Spec:
https://github.com/bytecodealliance/wasmtime/blob/4b3cef0268cf52a079e07f1d39327121c13561a2/crates/wasi-io/wit/deps/io.wit#L184-L204

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 09:39):

xia-chao updated PR #14520.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 09:42):

xia-chao updated PR #14520.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 15:23):

github-actions[bot] added the label wasi on PR #14520.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 04 2026 at 15:23):

github-actions[bot] added the label wasmtime:c-api on PR #14520.

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

:cross_mark: xia-chao closed without merge PR #14520.


Last updated: Oct 11 2026 at 04:10 UTC