Skip to content

Conversation

yonihemi
Copy link
Member

Adds a withUnsafeBytes function allowing Swift code to access the entire backing buffer of a JavaScript typed array.

Motivation: Currently the way to use the data of a typed array in Swift is accessing one element at a time, passing each value through the runtime bridge.

@yonihemi yonihemi added the enhancement New feature or request label Jan 24, 2022
@yonihemi yonihemi marked this pull request as draft January 24, 2022 08:52
@yonihemi yonihemi marked this pull request as ready for review January 24, 2022 09:16
@yonihemi yonihemi merged commit 53a2de6 into swiftwasm:main Jan 24, 2022
@yonihemi yonihemi deleted the copy_typed_array branch January 24, 2022 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants