Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use WebAssembly.Memory#toResizableBuffer() in JS bindings #2942

Open
Assignees
@CountBleck

Description

Feature suggestion

When WebAssembly memories are grown, any existing ArrayBuffers are detached...unless we use the brand-new toResizableBuffer() method on WebAssembly.Memory objects.

Calling this method in our JS bindings would be beneficial for AssemblyScript because it prevents us (in bindings) and users from worrying about views into the Wasm memory detaching, because they won't detach and will actually grow automatically if the view isn't constructed with a set length: see the resizable ArrayBuffer proposal and the merged spec (see steps 4-9). This could, in the future, maybe let us pass TypedArrays to users without copying them in the ESM bindings, if we want to (re?)add that feature.

This change should be very very very simple (shouldn't take more than 10 or 20 lines of code).

This is being created as an issue first, because browsers haven't widely implemented this yet, so we have to wait until they do.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /