Hacker News Viewer

Show HN: QuickBEAM – run JavaScript as supervised Erlang/OTP processes

by dannote on 3/28/2026, 9:03:23 PM

QuickBEAM is a JavaScript runtime embedded inside the Erlang&#x2F;OTP VM.<p>If you’re building a full-stack app, JavaScript tends to leak in anyway — frontend, SSR, or third-party code.<p>QuickBEAM runs that JavaScript inside OTP supervision trees.<p>Each runtime is a process with a `Beam` global that can: - call Elixir code - send&#x2F;receive messages - spawn and monitor processes - inspect runtime&#x2F;system state<p>It also provides browser-style APIs backed by OTP&#x2F;native primitives (fetch, WebSocket, Worker, BroadcastChannel, localStorage, native DOM, etc.).<p>This makes it usable for: - SSR - sandboxed user code - per-connection state - backend JS with direct OTP interop<p>Notable bits:<p>- JS runtimes are supervised and restartable - sandboxing with memory&#x2F;reduction limits and API control - native DOM that Erlang can read directly (no string rendering step) - no JSON boundary between JS and Erlang - built-in TypeScript, npm support, and native addons<p>QuickBEAM is part of Elixir Volt — a full-stack frontend toolchain built on Erlang&#x2F;OTP with no Node.js.<p>Still early, feedback welcome.

https://github.com/elixir-volt/quickbeam

Comments

by: jbpd924

Interesting!! I&#x27;ve been playing around with QuickJS lately and uses Elixir at work.<p>I&#x27;m interested to hear about your sandboxing approach running untrusted JS code. So you are setting an memory&#x2F;reduction limit to the process which 100% is a good idea. What other defense-in-depth strategies are you using? possible support for seccomp in the future?

3/29/2026, 6:34:02 PM


by: hosh

1. Are each of the JS processes running in its own process and mailbox? (I assume from the description is that each runtime instance is its own process)<p>2. can the BEAM scheduler pre-empt the JS processes?<p>3. How is memory garbage collected? Do the JS processes garbage collect for each individual process?<p>4. Are values within JS immutable?<p>5. If they are not immutable, are there risk for memory errors? And if there is a memory error, would it crash the JS process without crashing the rest of the system?

3/29/2026, 7:56:22 PM


by: waffleophagus

Running JS on the Beam VM, all written in C. I don&#x27;t know if this is just cursed, or absolutely brilliant, either way I love it and will be following closely. Will definitely have to play with it.

3/29/2026, 6:40:50 PM


by: dnautics

love this! a while back i noodled around with this idea, but didn&#x27;t get that far:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ityonemo&#x2F;yavascript" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ityonemo&#x2F;yavascript</a><p>glad to see someone do a fuller implementation!

3/29/2026, 7:25:31 PM


by: theflyinghorse

This is very interest to me because we have accumulated a few node packages containing logic that services simply import. So in theory I could now use those node packages in elixir?

3/29/2026, 5:42:45 PM