Skip to content

[core][ios] Add support for ArrayBuffers#41548

Merged
barthap merged 10 commits intomainfrom
@barthap/array-buffers/ios
Jan 12, 2026
Merged

[core][ios] Add support for ArrayBuffers#41548
barthap merged 10 commits intomainfrom
@barthap/array-buffers/ios

Conversation

@barthap
Copy link
Copy Markdown
Contributor

@barthap barthap commented Dec 11, 2025

Why

Follow up #41404 and #41415 for Android.
Adds support for JavaScriptArrayBuffer and NativeArrayBuffer in Expo modules.

How

  • Similarly to Android version, created two types of ArrayBuffers:
    • JavaScriptArrayBuffer that wraps JSI ArrayBuffer object
    • NativeArrayBuffer that manages direct memory, is thread safe, can be created on native side. When used as argument type, a JS buffer is copied. Then, zero-copy JSI ArrayBuffer is created upon returning.
    • Both inherit the ArrayBuffer class which contains some utilities for working with Unsafe[...]Pointers and Data.

I tried to keep code organized similarly to the typed arrays implementation, to keep it somehow consistent.

Test Plan

  • Created native unit test specs for the APIs.
  • Manual testing in NCL

Checklist

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Dec 11, 2025
@barthap barthap force-pushed the @barthap/array-buffers/ios branch from 91037c5 to 156bc6f Compare December 11, 2025 08:31
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Dec 11, 2025
@expo-bot
Copy link
Copy Markdown
Collaborator

expo-bot commented Dec 11, 2025

The Pull Request introduced fingerprint changes against the base commit: 8ea5b2a

Fingerprint diff
[
  {
    "op": "changed",
    "beforeSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "9dedccf6bf207b12be2007a2eaafcfb7fd0b5d34"
    },
    "afterSource": {
      "type": "dir",
      "filePath": "../../packages/expo-modules-core",
      "reasons": [
        "expoAutolinkingIos",
        "expoAutolinkingAndroid",
        "expoAutolinkingIos"
      ],
      "hash": "570a540a11f807254c4f5586afcebc97bfee8db7"
    }
  }
]

Generated by PR labeler 🤖

@barthap barthap requested review from lukmccall and tsapeta December 12, 2025 08:51
@barthap barthap marked this pull request as ready for review December 12, 2025 08:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 12, 2025

Subscribed to pull request

File Patterns Mentions
packages/expo-modules-core/** @Kudo, @lukmccall, @tsapeta

Generated by CodeMention

Co-authored-by: Łukasz Kosmaty <kosmatylukasz@gmail.com>
@barthap barthap merged commit b660ed1 into main Jan 12, 2026
20 checks passed
@barthap barthap deleted the @barthap/array-buffers/ios branch January 12, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants