WebAssembly / WebAssembly/WASI
Discussion regarding a WASI embedding API (wasi-c-api)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 333
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 3
Description
Moving the discussion from https://github.com/WebAssembly/wasm-c-api/issues/122 to this repo.
The Wasm C API allows embedders to embed a Wasm engine to instantiate Wasm modules, providing imports to the module.
However, the Wasm C API has no understanding of WASI's existence and that's probably for the best. As @sbc100 and @rossberg suggested, perhaps there is a need for a "WASI C API" for embedding WASI-implementing WebAssembly engines. This would allow embedders to reuse the engine's WASI implementation without having to import their own when using the Wasm C API.
This API would likely be an extension to the Wasm C API that would allow:
- The configuration of WASI (preopens, argv, environ, etc.) on a per-module basis.
- The ability to instantiate (see
wasm_instance_newin the Wasm C API) a module with WASI imports (all or some supported subset).
While this doesn't pertain to WASI itself, I think this repo is the best place to kick off a discussion on this topic.
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
Start by reading the linked wasm-c-api issue 122 and the Wasm C API entry point wasm_instance_new. Compare the proposed per-module configuration and WASI-import instantiation requirements with the existing API discussion. Done means reaching an agreed direction for the embedding API, rather than making a defined code change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, wasm
- Domain
- api, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100