Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explainer for text conversion stuff #1409

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

morlovich
Copy link
Collaborator

Relevant to #961

Similarly, a Uint8Array containing UTF-8 data can be converted to a String by calling
`protectedAudience.decodeUtf8(someArray)`. Note that this is specifically for Uint8Arrays, and
will not handle other, similar, types.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
These utility functions are useful for passing `String`s into and out of WebAssembly functions where `String`s are required to pass through the [`WebAssembly.memory ArrayBuffer`](https://developer.mozilla.org/en-US/docs/WebAssembly/Reference/JavaScript_interface/Memory).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Did only the first part since I don't want to tell people with more WebAssembly experience than me how to interface with it...

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