alt.hn

3/29/2026 at 8:38:26 PM

Show HN: Crazierl – An Erlang Operating System

https://crazierl.org/demo/

by toast0

3/29/2026 at 9:44:27 PM

I've thought about doing something like this but I am only very recently getting into low-level OS stuff.

I can't remember who said this, but they called "Erlang an operating system for your code", and I think that's fairly accurate. When I build an Erlang app, I don't build it the same way as I would with Rust; I have a lot of independent gen_servers that do operate independent from each other.

The Erlang VM is (roughly) preemptive multitasking, and even each process has its own GC, so it does feel like it could be a natural fit for its own operating system without having to live on top of Linux.

by tombert

3/29/2026 at 9:54:41 PM

There's some definite prior art here where they worked on that a LOT.

https://www.erlang-factory.com/static/upload/media/149858389...

by calvinmorrison

3/29/2026 at 10:18:27 PM

You know, I read those slides when they were new, and I apparently just completely forgot about it.

Not that it's not interesting, just that my brain is dumb sometimes.

by tombert

3/29/2026 at 10:34:18 PM

Unfortunately, the hydros project website is gone. I'm not sure if it moved somewhere.

by toast0

3/31/2026 at 12:20:15 AM

here's what I dug up

https://github.com/attah/hydros

https://github.com/samcamwilliams/hydros-site

by calvinmorrison

3/31/2026 at 4:36:46 PM

Thanks! There's some really interesting things here. I chose to interface with some basic hardware only from my kernel, but hydros uses Erlang to interface with the IO-APIC and a bunch of other stuff. They've even got NIFs to do sti/cli from Erlang.

by toast0

3/29/2026 at 8:50:34 PM

Is the OS implemented from scratch, or is it a stripped down version of some existing OS?

by mixedbit

3/29/2026 at 9:17:29 PM

The kernel is pretty much from scratch. It provides a FreeBSD compatible syscall interface for the syscalls that BEAM calls, as well as the FreeBSD runtime loader. I do make healthy use of FreeBSD libraries to provide the OS, you can get an idea of what I pull from the file names in the Makefile [1]. Building an OS is a lot, so I tried to stick to the parts I find fun and interesting. Things like a NIC driver in Erlang [2] (with NIFs to copy to/from device memory). But process / thread creation is original, memory management is original (not necessarily good), time keeping is original, etc. I used existing code and interfaces so I didn't have to write a bootloader, memcpy, and lots of other stuff.

[1] https://github.com/russor/crazierl/blob/main/Makefile#L23

[2] https://github.com/russor/crazierl/blob/main/src/rtl_8168.er...

by toast0

3/30/2026 at 12:45:15 AM

DragonFlyBSD would be really interesting here as well since its kernel has Light Weight Kernel Threads that use message passing. Similar in shape to Erlang/BEAM. Though I guess you've built the kernel in Erlang... so wrong abstraction.

by asenchi

3/30/2026 at 1:17:48 AM

My kernel is in C. BEAM is in userspace. Most of the drivers are in userspace too. Turns out, if you let userspace mmap whatever address it wants to, and have access to all the i/o ports, plus have a way to hook interrupts, you can write drivers in userspace.

You could run beam as init with an existing kernel, but I wanted to explore something with less kernel.

by toast0

3/29/2026 at 10:56:42 PM

> browser-based demo

Wait, so is the browser running a JavaScript build of Qemu? /

by lightandlight

3/29/2026 at 11:16:34 PM

I don't think v86 [1] is based on qemu, but it's a javascript (well javascript + rust->wasm) virtual PC. Not my project, it's super lovely for hobby os demos though. (And they've taken a couple of my PRs!)

[1] https://copy.sh/v86/ https://github.com/copy/v86

by toast0

3/30/2026 at 7:13:11 PM

super interesting!

by kajogo

3/30/2026 at 1:06:19 AM

[flagged]

by zephyrwhimsy

3/30/2026 at 1:05:39 AM

[flagged]

by zephyrwhimsy

3/30/2026 at 1:04:59 AM

[flagged]

by zephyrwhimsy