Skip to content

all: add GOOS=wasip2 port #65333

Open
Open
@mauri870

Description

@mauri870

WASI preview 2 was officially released.

With the launch of preview2, preview1 will be deprecated and transitioned to legacy support across various tools. For instance, the documentation for wasmtime indicates that legacy code will be removed after 2 releases after the landing of preview 2.

The main differences between WASI Preview 1 and Preview 2 are:

  • Capability-based Security: WASI Preview 2 introduces capability-based security principles, using the facilities provided by the Wasm component model. All access to external resources is provided by capabilities. Handles, defined in the component-model type system, dynamically identify and provide access to resources.

  • Modularity: WASI Preview 2 uses the component model's worlds mechanism to allow specific sets of APIs to be described which meet the needs of different environments.

  • New Interface Definitions: For those familiar with WASI preview 1, interfaces have been adapted to use high-level types defined by the Component Model and are defined with WIT, including WASI IO, Filesystem, Clocks, and Random. A WIT package is a collection of WIT interfaces and worlds. A world is a complete description of both imports and exports of a component and may be used to represent the execution environment of a component

When we get a stable GOOS=wasip2 we might have to think on ways to deprecate (or remove) wasip1 in a future Go version.

It should be possible to "bridge" preview1 and preview2 in such a way that preview1 programs still work on preview2.


This issue now tracks discussions and feature requests regarding the new port.

Related Issues

GOOS=wasip1 tracking issue

cc @golang/wasm

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.arch-wasmWebAssembly issues

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions