Skip to content

Resizable buffers integration in Wasm/JS API #876

@dtig

Description

@dtig

Description

This feature lets the Wasm/JS API vend resizable buffers in WebAssembly.Memory, making the Wasm API more ergonomic for JS integration.

Resizable buffers is an existing JS feature that added the ability to resize ArrayBuffer instances and to grow SharedArrayBuffer instances.

Specification

The Wasm/JS API is already merged into the Wasm spec (PR). The JS feature is already Stage 4 (merged into the standard)

Additional Signals

Emscripten would benefit from using this feature, as WebAssembly buffers has always been able to resize/grow. Since Wasm memories are exposed as ArrayBuffers, which by default cannot resize nor grow, growing the memories has to be expressed in unergonomic ways like detaching and requires manual polling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions