Skip to content

ArrayBuffer support to C++ TurboModules#56729

Open
paradowstack wants to merge 10 commits into
facebook:mainfrom
paradowstack:feat/array-buffers
Open

ArrayBuffer support to C++ TurboModules#56729
paradowstack wants to merge 10 commits into
facebook:mainfrom
paradowstack:feat/array-buffers

Conversation

@paradowstack
Copy link
Copy Markdown
Contributor

Summary:

Adds ArrayBuffer support to C++ TurboModules. This includes:

  • Codegen support for ArrayBufferTypeAnnotation in module specs
  • AsyncArrayBuffer — a move-only bridging type for holding ArrayBuffer data off the JS thread
  • Bridging<AsyncArrayBuffer>::toJs for resolving promises with native-backed or owned-bytes buffers

iOS and Android support will follow in separate PRs. The new codegen type is currently restricted to C++ TurboModules via excludedPlatforms: ['iOS', 'android'].

Changelog:

[GENERAL] [ADDED] - Add ArrayBuffer support to C++ TurboModules

Test Plan:

  • JS parser/generators tests added.
  • New bridging unit tests in BridgingTest.cpp cover AsyncArrayBuffer construction and JS bridging.
  • rn-tester: getArrayBuffer, processAsyncBuffer, and getAsyncBuffer methods added to NativeCxxModuleExample in demo app.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 8, 2026
@facebook-github-tools facebook-github-tools Bot added p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels May 8, 2026
@paradowstack paradowstack force-pushed the feat/array-buffers branch from b568fbe to 8a8b192 Compare May 8, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant