Skip to content

FEATURE: add Ruby-to-JS Uint8Array support#406

Merged
SamSaffron merged 2 commits intomainfrom
binary
Apr 16, 2026
Merged

FEATURE: add Ruby-to-JS Uint8Array support#406
SamSaffron merged 2 commits intomainfrom
binary

Conversation

@SamSaffron
Copy link
Copy Markdown
Collaborator

Introduce MiniRacer::Binary for attached Ruby callbacks that need to
return raw bytes to JavaScript. The C extension now serializes this
wrapper as a Uint8Array, and TruffleRuby is updated to mirror the same
conversion path.

Also add documentation, tests, and bump the version to 0.20.1.

Introduce MiniRacer::Binary for attached Ruby callbacks that need to
return raw bytes to JavaScript. The C extension now serializes this
wrapper as a Uint8Array, and TruffleRuby is updated to mirror the same
conversion path.

Also add documentation, tests, and bump the version to 0.20.1.
Copy link
Copy Markdown
Collaborator

@davidtaylorhq davidtaylorhq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Perhaps this should be 0.21.0, since it introduces a new feature?

@SamSaffron
Copy link
Copy Markdown
Collaborator Author

sure I can do a bump...

@SamSaffron SamSaffron merged commit 40d83a3 into main Apr 16, 2026
45 of 49 checks passed
SamSaffron pushed a commit that referenced this pull request May 4, 2026
* Improve error messages when running on TruffleRuby

* Adapt test_binary_returns_uint8array to not assume that Uint8Array are converted to String

* This fixes #409.
* The test was added in #406.

* Cleanup truffleruby CI job

* Add timeout to avoid a hang to take 6 hours.
* A single job on macOS seems enough.
* Remove no longer necessary bundler update and TRUFFLERUBYOPT.

* Add test for converting a JS Uint8Array to Ruby and implement it on TruffleRuby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants