Replies: 1 comment 2 replies
-
I don't quite understand the question, can you elaborate? In a browser, Wasm GC objects are essentially allocated on the same heap as JS objects. Hence, references to both can be passed back and forth between Wasm and JS for free. (Conceptually, Wasm memory objects are also allocated on this heap, although with somewhat special techniques. But to the engine it's just a byte array, and the Wasm/JS GC does not look at its contents.) Outside browsers, there generally is no JavaScript, so Wasm GC has its own heap, which again is separate from memories. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current way of using wasm is still javascript loading using wasm, and wasm memory is also allocated by JavaScript, so using JavaScript Gc directly can't solve the problem?
Beta Was this translation helpful? Give feedback.
All reactions