Repository navigation
Path to Phase 4 #198
Copy link
Copy link
Open
Description
The current main branch has become miserably out of date. We now have a rebased version of (most of) the threads specification living in a new branch (and I'm very grateful for @ioannad's invaluable help here). I've also passed over this branch to excise some long-standing bugs (e.g. #195) and other TODOs.
I'm using this issue to track my progress towards getting Threads phase 4-ready, since the only remaining bar facing the proposal's standardisation is full specification text. My intention is to start out doing this work in the upstream-rebuild branch, although I'm sure we'll have a conversation about how to update main at some point.
Core document TODOs:
generalise binary encoding to allow LEBsgive text descriptions forwaitandnotifydescribe behaviour of thewait'(suspend) administrative instructionfix tearing behaviour of float and SIMD non-atomicsdescribe the behaviour of the concurrent host- todo: finish writing prose / evaluate alternative formalisations
todo: fully remove old host state particle
extend configurations to hold multiple threadsfix shared memory bounds checks in instantiationrebase in the axiomatic constraints of the relaxed memory modeltodo: predicates should be coinductive- todo: work out why sphinx is rendering negative space weirdly
todo: auxiliary functions- todo: finish writing prose
- extend these constraints to describe
wait/notifyqueue behaviour link the above constraints to the actions emitted in the operational semanticstodo: syntax for coinductives
- formatting - add line breaks where the PDF overflows
JS-API document TODOs:
check with an expert whether I got the JS-API rebase correctintegrate with growable SharedArrayBuffer- final inline todos
Interpreter TODOs:
rebase the interpreter into the new branchcollect together the tests from the other WIP branches- update
.wast->JStest generation tool to handlethreadandwait
Misc TODOs:
- re-unify with main(?)
update the spec render- check whether any other documents need updating
- final inline TODO sweep
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
codefromthecrypt commentedon May 22, 2023
since phase 4 is "finished", do you have a sense of which runtimes have been able to implement this considering the disrepair of the spec text, leading to this issue? Wondering if wasm3 wasmer etc have managed despite it.
conrad-watt commentedon May 22, 2023
One of the requirements of phase 4 is that two Web engines implement the feature, often on the basis of the overview description before the full spec text is finalised. For threads, I believe all of V8, WekKit, and SpiderMonkey implement the feature. Of course, it's still a problem that the spec text is taking so long to be produced.
I'm not too familiar with the state of non-Web runtimes, but I believe that at least Wasmtime and WAMR have some threads implementation, on the basis of this blog post.
abrown commentedon Jun 15, 2023
(Wasmtime does support the threads proposal; status here).
achille-roussel commentedon Jul 1, 2023
Hello @conrad-watt
I noticed that progress is being made on the upstream-rebuild branch!
I just wanted to share words of support, this proposal is awaited with a lot of excitement in the community; it's going to be a great leap forward for WebAssembly once it lands 👏
conrad-watt commentedon Sep 28, 2023
The spec render (https://webassembly.github.io/threads/) is now updated to be based on the upstream-rebuild branch. There are still a handful of todos but it should be in a far better state than what was previously available there.
conrad-watt commentedon Oct 1, 2023
Small bump: the interpreter with green threads, and associated tests, should now be fully rebased into the upstream-rebuild branch - the only caveat is that the harness for generating JS tests from
.wasttests has not yet been updated to handle thethreadconstruct in.wast(currently reports NYI if run).conrad-watt commentedon Oct 11, 2023
Phase 4 has been achieved following the first day of our October hybrid meeting (notes to be uploaded shortly) 🎉
I'll make one last pass over the remaining issues in this repository shortly. The final step, after editorial tweaking, is to make preparations to join the "merge queue" of new phase 4 proposals, which will probably involve rebasing on top of the GC proposal.
temeddix commentedon Oct 25, 2023
Can't wait this for this proposal to go live! It just opens up a whole new possibilities.
I wonder if these links are related to that 'October hybrid meeting':
rossberg commentedon Oct 25, 2023
The proposal is "live" already, in the sense that most major engines have shipped it for quite a while.
The spec bit you link has no direct relation to this proposal, the notion of a thread has always existed as a spec device. You want to look here for the draft spec with threading.