Skip to content

How to log elements in ref struct and ref array at js side? #493

Answered by tlively
oovm asked this question in Q&A
Discussion options

You must be logged in to vote

WasmGC structs and arrays are completely opaque to JS, which is why you're seeing an empty object { }. That also means that the only way to access their contents from JS is by calling exported Wasm functions that can do the accesses. There is broad interest in making this easier, but all the obvious solutions would be technically very challenging to implement in JS engines, so I wouldn't expect this to change soon.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oovm
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