WebAssembly / WebAssembly/component-model
When is a start function's post-return option called?
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Description
In thinking about start functions recently one question I wasn't sure how to answer is when the returned values are "invalidated" or otherwise when the component can be reentered. A better way to phrase this I found was to ask when is the post-return canonical abi option for a start function invoked? Unlike normal functions which have a clearly defined time when the results have been processed (e.g. lifted and then lowered back into the destination) start functions are different where their values are consumed possibly much later during a component's full instantiation process.
Another related but slightly different scenario: if a component exports both a function and a value, if the embedder supports invoking the function before reading the value then this forces the value to be removed from linear memory and copied to the host. Otherwise ideally the embedder would like to leave the value in linear memory but would require that the exported function is not invoked until the value export is read. This seemed like a pretty different model than the current "you get a bag of exports" model that core wasm has and I wanted to make sure this was intentional.
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
No files, tests, or entry points are named; start by reading the issue and its 14-comment discussion about start functions, post-return canonical ABI options, and exported values. Done would be an agreed, documented answer defining the intended instantiation and reentry semantics.
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