WebAssembly / WebAssembly/component-model

Proposal: Component Model v0

Open
#479 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
1.4k
Forks
130
Avg merge
2d 1h
Merged PRs (30d)
15

Description

Currently, the component model is very complicated and difficult to understand and to implement. In particular, wasmtime has the only working implementation of the component nodel: wasmtime-environ, which is used by Rust dependents to lower the component model into a representation they can handle, which still has many layers of confusing abstraction.

I propose we create a minimal subset of the component model which can be implemented by other, external, runtimes and compilers, including:

  • Components are not allowed to be nested, imported, or exported
  • Async is disallowed, both in ABI options and types
  • Encodings other than the native encoding, either UTF-8 or WTF-16, are disallowed
  • externrefs are disallowed as handle types

This subset, which I propose to call Component Model v0, should include most single-module components, allowing external tools to parse this simplified representation and thus implement WASI 0.2 for it. At a later point, when the external tool is fully developed, the full component model might be implemented within that tool.

First mention of this complexity

TODO: compare with wasit2
TODO: finalize restrictions

Contributor guide

No contributing guide indexed for this repository

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

Start by reviewing the proposed restrictions in this issue and the linked discussion in WASI issue 617. Compare the proposal with wasit2 and inspect how wasmtime-environ represents the component model. Done means the Component Model v0 restrictions are finalized and the minimal subset is clearly specified.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.