Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The initial MVP of WASM won't have privileged support for any custom runtime services, so in order to run Go code in the browser (or any other GC'd language) you'd have to compile the entire runtime with it and ship it all over the wire to the client. Eventually they do hope to lift this restriction.


The other issue is that a lot of GC implementations do stuff that's incompatible with asm.js/WASM like inspecting function stacks.


Not entirely incompatible... an implementation could manage the stack explicitly.


Not sure what you mean? Libraries like libgc can't be directly ported over to Emscripten since they depend on platform specific behavior to inspect the execution stack and registers.

In asm.js/WASM the execution stack is not inspectable from code.


Rather than using the execution stack provided by the environment (by using the built-in calling conventions directly), you could manage your stack on the heap using the linear memory facilities. Function calls are a bit more expensive, since now you need a macro to convert calling conventions. But it's definitely not impossible, and it's not even really all that hard (just tedious).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: