Nelua

The Nelua ecosystem

NeluaA native stack

A compiler, C library and Unix userland in one systems programming ecosystem. Nelua brings Lua syntax and compile-time metaprogramming to native programs that compile through C.

Core

Language

Compiler

A Nelua compiler fork with exhaustive matching, ownership, compile-time evaluation and file-local syntax extensions.

C library

nelibc

A C library written in Nelua, with hybrid builds over glibc, musl and Cosmopolitan and a standalone Linux runtime.

Userland

nebox

Unix applets in a single static executable linked against standalone nelibc.

Boot manager

neboot

A UEFI boot menu written in Nelua. Start Cascadia with Theseus Init or OpenRC recovery, or chainload another EFI application.

Shell

nsh

The interactive POSIX shell included in nebox, with command completion, searchable history and job control.

Compiler driver

necc

Compile C and Nelua against standalone Nelibc or run Lua from the staged SDK.

Linker

nelinker

Link x86-64 ELF objects into Linux executables or PE32+ EFI applications.

Build runner

nebuild

Run incremental, parallel builds from a build.ne dependency graph.

Core performance

Each project names the workloads, hardware and baselines used for its timings. Open a comparison for the measured results and individual samples.

Nelibc benchmarks

The goal is the fastest correct implementation of the libc operations programs use most. The current evidence compares glibc, musl and Cosmopolitan, each alone and with Nelibc, on the same host and consumer.

Completion

glibc: 819; musl / Zig: 793; Cosmopolitan: 399 of 1,471 tracked names exported by Nelibc. These count owned implementations, not standards compliance. Cosmopolitan deliberately delegates more stateful services.

Conformance

glibc: 301 → 325 passes; musl / Zig: 327 → 333 passes; Cosmopolitan: 279 → 301 passes in the matched functional, regression and math corpus. Build failures, runtime failures and newly failing tests are all reported.

Performance

Synthetic record parser, baseline time ÷ Nelibc time: glibc 1.16×; musl / Zig 3.38×; Cosmopolitan 4.43×. Above 1× is faster. The detailed results include memory, strings, conversion, math, allocation, formatting and sorting, including slower cases and delegated calls.

Measured 2026-11-21 UTC over 7 comparison rounds. Consumer correctness checks passed before timing.

On an eight-byte search with no match, Cosmopolitan with Nelibc took 2.77 ns, compared with 3.98 ns for previous Nelibc and 2.24 ns for the native runtime. See the timing and correctness controls.

14 of 14 integration targets passed. See individual targets and expected failures.

Build the stack

Build the compiler fork, the standalone Nelibc archive and nebox on Linux x86-64 with Git, Make and Zig installed.

About freestanding builds
git clone https://github.com/Spaceghost/nelua
make -C nelua
git clone https://github.com/Spaceghost/nelibc
make -C nelibc lib-standalone-zig
git clone https://github.com/Spaceghost/nebox
make -C nebox NELIBC=../nelibc test

Workshop

Libraries and programs built on the Nelua core.

  • Theseus Init

    Boot Linux and supervise services with native CUE definitions and an adapter for OpenRC services.

  • Drift

    Portable Virtio, xHCI, NVMe, Ethernet and AHCI drivers written in Nelua.

  • Atlas firmware

    ESP32-S3 LoRa field controllers using Nelua alongside Lua and ESP-IDF.

  • melodica.h

    Five implementations of the Pandora protocol behind one C ABI, including Nelua.

  • libc.bend

    A Bend 2 libc built on the Nelibc host profile.

  • Writ

    Information-flow control in Bend 2 and the first consumer of the Nelibc host profile.

World

Upstream Nelua and the wider community.