Skip to content

Proposal: Component Model v0 #479

Open
@gkgoat1

Description

@gkgoat1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions