WebAssembly / WebAssembly/component-model
Idea: cheap trivial streams / futures
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Description
(post-0.3.0)
Currently we use option<stream<...>> (e.g. here) to avoid stream bookkeeping for empty streams (iirc).
As an alternative, how about a stream.empty built-in that returns a "pre-dropped" readable stream? This would be semantically equivalent to stream.new + stream.drop-writable.
A little more complicated but potentially even more useful would be a future.resolved, acting like future.new + future.write. There are a lot of future<result<...>> return types that could benefit from being able to return future.resolved(err(...)).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with wit-0.3.0-draft/types.wit at the linked stream definition, then review the existing stream.new/drop-writable and future.new/write semantics. The issue is complete only after the project decides whether stream.empty and future.resolved belong in the post-0.3.0 design and records the resulting specification changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100