This repository was archived by the owner on Nov 25, 2025. It is now read-only.
feat(p3): only allow body.stream calls once#156
Closed
rvolosatovs wants to merge 1 commit intoWebAssembly:mainfrom
Closed
feat(p3): only allow body.stream calls once#156rvolosatovs wants to merge 1 commit intoWebAssembly:mainfrom
body.stream calls once#156rvolosatovs wants to merge 1 commit intoWebAssembly:mainfrom
Conversation
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
This was referenced Mar 11, 2025
Member
|
Ah, the intended design (which could perhaps be documented more clearly) was that if you call |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only allow
body.streamto be called once.This simplifies the host implementation and the amount of bookkeeping that would need to be performed by the runtime. I cannot really come up with a use case that would be impossible for guests to implement using the "at-most-once" call semantics.
We can always relax this requirement at a later point of time if it becomes an issue, but we can't quite go the other way round
This is aligned with e.g.:
tcp-socket.receivehttps://github.com/WebAssembly/wasi-sockets/blob/41d707935af71418ea5477d5fc9c7281353fa7f5/wit-0.3.0-draft/types.wit#L326-L346tcp-socket.listenhttps://github.com/WebAssembly/wasi-sockets/blob/41d707935af71418ea5477d5fc9c7281353fa7f5/wit-0.3.0-draft/types.wit#L226-L289