Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizable buffers integration in Wasm/JS API #876

Closed
dtig opened this issue Oct 9, 2024 · 2 comments
Closed

Resizable buffers integration in Wasm/JS API #876

dtig opened this issue Oct 9, 2024 · 2 comments
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal

Comments

@dtig
Copy link

dtig commented Oct 9, 2024

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.

@dtig dtig added the focus-area-proposal Focus Area Proposal label Oct 9, 2024
@mehagar
Copy link

mehagar commented Oct 22, 2024

As a user of Emscripten, this is especially useful when using its support for multithreading and memory growth, since we have to constantly check if the buffer has been replaced before using it.

@wpt-interop
Copy link
Collaborator

Thank you for proposing Resizable buffers integration in Wasm/JS API for inclusion in Interop 2025.

We are pleased to let you know that this proposal was accepted as part of the WebAssembly Additions focus area. You can follow the progress of this focus area on the Interop 2025 dashboard.

For an overview of our process, see proposal selection. Thank you for contributing to Interop 2025!

Posted on behalf of the Interop team.

@foolip foolip added the accepted An accepted proposal label Feb 17, 2025
@foolip foolip closed this as completed Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted An accepted proposal focus-area-proposal Focus Area Proposal
Projects
Status: Done
Development

No branches or pull requests

4 participants