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...