Skip to content

Implement support for ResizableArrayBuffer/GrowableSharedArrayBuffer integration #24287

Closed

Description

@dschuff

This proposal has been implemented in engines, and we should implement support for it in Emscripten. Specifically, that would mean switching to RAB/GSAB to back the typed heap views; with pthreads + growable memories, this would allow us to avoid checking for detachment on every heap reference. We might also want to do it with RAB in the non-threaded case (since the behavior of RAB matches wasm memories more closely) but that seems like less of a big deal.

There are a couple of open questions still in the spec (see discussion in the recent CG meeting but it probably doesn't block starting on this.

Activity

  1. sbc100 commented on May 8, 2025

    @sbc100
    Collaborator

    Do we need a flag to enable it node and/or chrome for testing?

  2. dschuff commented on May 9, 2025

    @dschuff
    MemberAuthor

    For Chrome, I don't think so, it seems to be available without a flag. I'm not sure about node.

  3. sbc100 commented on Jul 10, 2025

    @sbc100
    Collaborator

    It looks like the feature we would depend on here is Memory.toResizableBuffer() which is currently still behind --experimental-wasm-rab-integration in chrome and node.

  4. added a commit that references this issue on Jul 10, 2025
    860ea7a
  5. kleisauke commented on Jul 11, 2025

    @kleisauke
    Collaborator

    You're right, I didn't realize it also required the WebAssembly.Memory.toResizableBuffer() API. Hopefully that stabilizes soon.

  6. added 6 commits that reference this issue on Jul 11, 2025
    48e0c44
    e41ea59
    856b5d2
    2608cc4
    a3cf371
    7f1f929
  7. dschuff commented on Jul 11, 2025

    @dschuff
    MemberAuthor

    I think it will stabilize soon. There is discussion on WebAssembly/spec#1895 and a couple of PRs in flight (e.g. WebAssembly/spec#1871)

  8. added a commit that references this issue on Jul 14, 2025
    8d47d8e
  9. added a commit that references this issue on Jul 14, 2025
    42a3b4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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