Hacker News new | ask | show | jobs
by larsnystrom 106 days ago
WASM is kind of like Java bytecode, right? A compilation target which requires a runtime? But better sandboxed?
4 comments

In general, and with a lot of handwaving and omitting details: yes :)
If you consider just Wasm 1.0 and 2.0, the amount of “runtime” is relatively sparse.

A tool like wasm2c (or my wasm2go) shows this: there is no huge runtime to carry, just a fairly direct translation of Wasm byte code to C (or Go).

wasm2c: https://github.com/WebAssembly/wabt/blob/main/wasm2c/README....

wasm2go: https://github.com/ncruces/wasm2go

WASP is almost the same as Java Applets but buildinto browser and works without plugins.

Java Applets were amazing technology IMO. Windows Java launcher ruined it (as i understand that was the main security issue).

ps. Java 8 still works :P

Lower level, GC optional, supports stack allocated user defined types. Initially designed for C and C++ as an LLVM backend.