Add to that GC implementation is different for each language, so having generic garbage collector might not be desirable. Consider Erlang which supports millions of processes per node:
> Each Erlang process has its own stack and heap which are allocated in the same memory block and grow towards each other. When the stack and the heap meet, the garbage collector is triggered and memory is reclaimed. If not enough memory was reclaimed, the heap will grow.
That said, there is a WebAssembly compiler for Erlang:
> Each Erlang process has its own stack and heap which are allocated in the same memory block and grow towards each other. When the stack and the heap meet, the garbage collector is triggered and memory is reclaimed. If not enough memory was reclaimed, the heap will grow.
That said, there is a WebAssembly compiler for Erlang:
https://github.com/GetFirefly/firefly