WebAssembly / WebAssembly/component-model
Modal components
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 1.4k
- Forks
- 130
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 15
Description
This is a link to tom7's amazing PhD: http://tom7.org/papers/modal-types-for-mobile-code.pdf
As the PhD says, it's about "modal types for mobile code". We see it as an alternative to the threading model provided by component model's thread.spawn.
Importantly, while modal types can be trivially used for threads, they can also be extended beyond threads, into the areas of heterogeneous computing. This includes, for example:
- An async-signal safety model, for WASI users who really want to shoot themselves in the foot, like ourselves.
- Possible other cases like bridging across the client-server model. Not that anyone would ever actually use this, but it's fun to talk/think about.
So, the main use case for modal components is to provide threads without providing threads. It's basically a generic API for providing things that work like threads. Because, whether you like it or not, threads are mobile code. (With shared-ish memory, but we can just extend the model for that, it doesn't have to be shared-nothing.) But it can also do other things. In fact, you could even use the same modal component API for system-equivalent subprocesses, like popen and stuff.
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 by reading the linked paper on modal types for mobile code and compare its model with the component model's thread.spawn. Then examine the proposed use cases for WASI async-signal safety, client-server bridging, and subprocess-like behavior. Done would require an agreed design for a generic modal component API, but the issue does not define one.
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
- 20/100