Skip to content

Comment on Wasm3 compiles itself (using LLVM/Clang compiled to WASM)parent

Comments

Adding things like garbage collection, direct DOM manipulation, polymorphic inline cache, etc. Things that would make it possible to run a decent scripting language without pulling in some huge runtime.

Doesnt this just imply building a 'huge runtime' into the language?

Not necessarily. GC can be implemented in a way that's fairly compatible with low-level programming, by leveraging support for multiple address spaces and/or memory segmentation. And WASM needs that kind of support anyway for its planned module-based security.

FWIW, AssemblyScript[0] adds its own garbage collection runtime into Wasm. The team had a good post recently on the performance implications[1]

[0] https://www.assemblyscript.org/

[1] https://surma.dev/things/js-to-asc/index.html

Not sure I understand. If parts of the runtime are already in the browser, then there's less to download.

AboutSource Built by g1lg1l

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