Skip to content

Is there any alternative to string_view in embind? #24662

Answered by hoodmane
hzhangxyz asked this question in Q&A
Discussion options

You must be logged in to vote

If the Uint8Array isn't already a view into WebAssembly memory, you'll need at least one copy if you want to have pointers into the buffer. All pointers are offsets into the WebAssembly memory. OTOH if you are okay with a read() style interface, it's possible to avoid a copy.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@hzhangxyz
Comment options

@hoodmane
Comment options

hoodmane Jul 8, 2025
Collaborator

Answer selected by hzhangxyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants