WebAssembly / WebAssembly/WASI
Composable WASI interfaces
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
I'd like WASI function calls to be routed to an instance based on the origin of the handle. This likely requires some dynamic routing capabilities in the wasm runtime.
As things currently work, a module is aware of all it's imports. As we move to a world of "shared-nothing linking", threads, and having the lifetimes of wasm instances decoupled from each other, an interesting problem arises.
Let's imagine two modules both providing the hypothetical standardized wasi file interface. Module A is an in-memory filesystem written in WASM, Module B is the host filesystem. An instance should be able to receive a handle to either module (or even both at the same time!) and call the standardized ready/write/stat/etc.. interfaces on the handle.
Currently, all WASI calls terminate in the engine, nothing else implements these interfaces. If we'd like other modules to be able to mint these capabilities (and other capabilities potentially not defined by WASI), something needs to route the calls.
Contributor guide
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 examining how WASI calls currently terminate in the engine and how shared-nothing linking, threads, and decoupled instance lifetimes affect handle ownership; done would mean routing calls to the instance that originated each handle while allowing modules to provide capabilities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- wasm
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100