WebAssembly / WebAssembly/WASI

Composable WASI interfaces

Open
#262 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-inactive
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.