Show HN

Ohnrscript

by @focusjordan

Hey HN, Excited to share Ohnrscript (.ohn) — a dual-compiling programming language that brings web-native syntax to low-level systems code. Ohnrscript lets you write code using familiar JavaScript syntax (const, let, function, class, array indexing), but compiles ahead-of-time (AOT) to either native LLVM IR or V8-optimized JS from the exact same source file. To demonstrate what the language can do on bare metal, we built the Ohn-Kernel—a 24KB HTTP unikernel written entirely in Ohnrscript syntax. It boots in under 1 millisecond inside QEMU or Firecracker, drives a VirtIO network card in Ring 0, and serves HTTP requests with zero OS dependencies and zero Garbage Collection (GC) pauses. Under the hood, everything is built on 32-bit integers (i32) and fixed memory buffers, allowing JS-like code to run with C-level speed and zero runtime overhead. We didn't set out with a grand plan to build a bare-metal kernel—we just followed our nose. As we explored compiler design and LLVM, we just kept pulling until we reached a point where we felt ready to share. You can test the kernel locally in under 30 seconds using Docker (instructions in the main README). Benchmarks: https://github.com/ohnrshyp/ohnrscript/blob/main/benchmarks/... Dev Guide: https://github.com/ohnrshyp/ohnrscript/blob/main/developer_g...

Discover more builders

Builderlust is an endless, joyful scroll of real projects people are shipping right now. Get the app to keep finding your next spark of inspiration.

📱 Coming soon to iOS & AndroidOpen in the app