Skip to content

Comment on Lunatic is an Erlang-inspired runtime for WebAssembly

Comments

hang on, what part of the web assembly stack is this competing with exactly? I'm likely just very ignorant on how Web Assembly works but I don't understand exactly how it fits. Do browsers have pluggable hooks for interpreting web assembly that you can swap out for this or smth? Or are we talking about running WebAssembly on the server here?

My understanding is using web assembly isolation to execute arbitrary untrusted code in a different (non-browser) env

So like what node.js is to javascript in the browser? For whatever reason I had mistakenly thought that web-assembly was purely a front-end browser thing.

Yeah, this is one of many non-browser runtimes, e.g. see https://github.com/appcypher/awesome-wasm-runtimes

Lunatic is more opinionated than most of these or node, though, in that it's trying to emulate a particular concurrent system design pattern borrowed from Erlang/BEAM.

mistakenly thought that web-assembly was purely a front-end browser thing

WASM has well defined boundaries and with WASI it adds some none browser APIs (but still sandboxed).

It's used a lot for:

- edge computing

- plugin systems (or sandboxing)

- easier cross platform code by targeting wasm (for code which is logically well-enough isolated you can compile it to wasm once end then just use it pretty much anywhere (web, app, desktop, server, edge, smarttv) reliable without having to worry about security or cross platform constraints.

- easier auto updating/ever green apps (e.g. I remember vaguely to have heard Disney+ does put all their core business logic into a wasm blob to for both easy cross platform and auto updating of some parts)

Lunatic doubles down one the server focused easy cross paltform + sandboxed aspects potentially deployed at the edge. But I also have seen people use a library wasm-runtime to embed a program written as stdin->dostuff->stdout CLI app into a go program without having to bother with cgo or cross platform support of the CLI app.

AboutSource Built by g1lg1l

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