Skip to content

Comment on Assembling WebAssemblyparent

Comments

Nothing prevents one to implement a GC on top of existing WebAssembly as it is

Except that efficient GC implementations use concurrency with a shared memory space and locking and memory-barrier instructions that are not yet available in WASM. (AFAIK, please prove me wrong)

Correct, shared memory and atomics are likely the first big post-MVP feature: https://github.com/WebAssembly/threads/blob/master/proposals...

Those operations are not available in all hardware architectures anyway, and they surely weren't even common before processors went multi-core.

So GC were implemented within those constraints, which means it is possible to do within the current state, even if it isn't the most optimal one versus the availabilities of such CPU features.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.