WebAssembly / proposals

Tracking WebAssembly proposals
1k stars 58 forks source link

At the moment, does WebAssembly has GC implemented? #101

Closed evertondanilo closed 2 years ago

evertondanilo commented 3 years ago

Based on the docs here, I think GC is in the specification phase. However, as Microsoft has released Blazor WebAssembly, I think that WA has some GC already implemented. Am I right? What GC features does WASM already have?

dschuff commented 3 years ago

I think Blazor is allocating their objects in wasm's linear memory, and then their GC scans inside the linear memory for pointers and frees them. The GC proposal is for objects outside the linear memory (managed by the VM that's running the wasm code, rather than the one running as compiled wasm code). on JS engines, these objects would be alongside the JS objects and be managed by the same GC.

protheory8 commented 3 years ago

@evertondanilo No, C# ships and uses their own GC.

tlively commented 2 years ago

Closing this issue because the question has been answered.