Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ reference interpreter and test suite.

The Component Model is currently being incrementally developed and stabilized
as part of [WASI Preview 2]. The subsequent [WASI Preview 3] milestone will be
primarily concerned with the addition of [async support][Concurrency Model].
primarily concerned with the addition of [async and thread support][Concurrency
Model].

## Contributing

Expand All @@ -32,11 +33,10 @@ To contribute to any of these repositories, see the Community Group's
[IDL]: design/mvp/WIT.md
[Text Format]: design/mvp/Explainer.md
[Binary Format]: design/mvp/Binary.md
[Concurrency Model]: design/mvp/Async.md
[Concurrency Model]: design/mvp/Concurrency.md
[Canonical ABI]: design/mvp/CanonicalABI.md
[formal spec]: spec/
[W3C WebAssembly Community Group]: https://www.w3.org/community/webassembly/
[Contributing Guidelines]: https://webassembly.org/community/contributing/
[WASI Preview 2]: https://github.com/WebAssembly/WASI/tree/main/wasip2#readme
[WASI Preview 3]: https://github.com/WebAssembly/WASI/tree/main/wasip2#looking-forward-to-preview-3
[Async Support]: https://docs.google.com/presentation/d/1MNVOZ8hdofO3tI0szg_i-Yoy0N2QPU2C--LzVuoGSlE/edit?usp=share_link
24 changes: 17 additions & 7 deletions design/mvp/Binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ label' ::= len:<u32> l:<label> => l (if len = |l|)
valtype ::= i:<typeidx> => i
| pvt:<primvaltype> => pvt
resourcetype ::= 0x3f 0x7f f?:<funcidx>? => (resource (rep i32) (dtor f)?)
| 0x3e 0x7f f:<funcidx> cb?:<funcidx>? => (resource (rep i32) (dtor async f (callback cb)?)) 🚝
| 0x3e 0x7f f:<funcidx> cb?:<funcidx>? => (resource (rep i32) (dtor async f (callback cb)?)) 🧡
functype ::= 0x40 ps:<paramlist> rs:<resultlist> => (func ps rs)
paramlist ::= lt*:vec(<labelvaltype>) => (param lt)*
resultlist ::= 0x00 t:<valtype> => (result t)
Expand Down Expand Up @@ -288,14 +288,14 @@ canon ::= 0x00 0x00 f:<core:funcidx> opts:<opts> ft:<typeidx> => (canon lift
| 0x01 0x00 f:<funcidx> opts:<opts> => (canon lower f opts (core func))
| 0x02 rt:<typeidx> => (canon resource.new rt (core func))
| 0x03 rt:<typeidx> => (canon resource.drop rt (core func))
| 0x07 rt:<typeidx> => (canon resource.drop rt async (core func)) 🚝
| 0x07 rt:<typeidx> => (canon resource.drop rt async (core func)) 🧡
| 0x04 rt:<typeidx> => (canon resource.rep rt (core func))
| 0x08 => (canon backpressure.set (core func)) πŸ”€
| 0x09 rs:<resultlist> opts:<opts> => (canon task.return rs opts (core func)) πŸ”€
| 0x05 => (canon task.cancel (core func)) πŸ”€
| 0x0a 0x7f i:<u32> => (canon context.get i32 i (core func)) πŸ”€
| 0x0b 0x7f i:<u32> => (canon context.set i32 i (core func)) πŸ”€
| 0x0c cancel?:<cancel?> => (canon yield cancel? (core func)) πŸ”€
| 0x0c cancel?:<cancel?> => (canon thread.yield cancel? (core func)) πŸ”€
| 0x06 async?:<async?> => (canon subtask.cancel async? (core func)) πŸ”€
| 0x0d => (canon subtask.drop (core func)) πŸ”€
| 0x0e t:<typeidx> => (canon stream.new t (core func)) πŸ”€
Expand All @@ -320,13 +320,21 @@ canon ::= 0x00 0x00 f:<core:funcidx> opts:<opts> ft:<typeidx> => (canon lift
| 0x21 cancel?:<cancel?> m:<core:memidx> => (canon waitable-set.poll cancel? (memory m) (core func)) πŸ”€
| 0x22 => (canon waitable-set.drop (core func)) πŸ”€
| 0x23 => (canon waitable.join (core func)) πŸ”€
| 0x40 ft:<typeidx> => (canon thread.spawn_ref ft (core func)) 🧡
| 0x41 ft:<typeidx> tbl:<core:tableidx> => (canon thread.spawn_indirect ft tbl (core func)) 🧡
| 0x42 => (canon thread.available_parallelism (core func)) 🧡
| 0x26 => (canon thread.index (core func)) 🧡
| 0x27 ft:<typeidx> tbl:<core:tableidx> => (canon thread.new_indirect ft tbl (core func)) 🧡
| 0x28 cancel?:<cancel?> => (canon thread.switch-to cancel? (core func)) 🧡
| 0x29 cancel?:<cancel?> => (canon thread.suspend cancel? (core func)) 🧡
| 0x2a => (canon thread.resume-later (core func)) 🧡
| 0x2b cancel?:<cancel?> => (canon thread.yield-to cancel? (core func)) 🧡
| 0x40 shared?:<sh?> ft:<typeidx> => (canon thread.spawn_ref shared? ft (core func)) πŸ§΅β‘‘
| 0x41 shared?:<sh?> ft:<typeidx> tbl:<core:tableidx> => (canon thread.spawn_indirect shared? ft tbl (core func)) πŸ§΅β‘‘
| 0x42 shared?:<sh?> => (canon thread.available-parallelism shared? (core func)) πŸ§΅β‘‘
async? ::= 0x00 =>
| 0x01 => async
cancel? ::= 0x00 =>
| 0x01 => cancellable 🚟
| 0x01 => cancellable 🧡
sh? ::= 0x00 =>
| 0x01 => shared πŸ§΅β‘‘
opts ::= opt*:vec(<canonopt>) => opt*
canonopt ::= 0x00 => string-encoding=utf8
| 0x01 => string-encoding=utf16
Expand Down Expand Up @@ -510,6 +518,8 @@ named once.
repurposed.
* Most built-ins should have a `<canonopt>*` immediate instead of an ad hoc
subset of `canonopt`s.
* Add optional `shared` immediate to all canonical definitions (explicitly or
via `<canonopt>`) when shared-everything-threads (πŸ§΅β‘‘) is added.


[`core:byte`]: https://webassembly.github.io/spec/core/binary/values.html#binary-byte
Expand Down
Loading