Nelua

Core · the build runner

nebuild

A small dependency runner written in Nelua. It builds the requested outputs from a build.ne file and skips recipes whose inputs and previous outputs still match.

Write a build.ne file

Each build line names one output followed by its inputs. Start the recipe on the next line with a literal tab. The optional default line selects what to build when no target is supplied.

build out/hello hello.c
	necc hello.c -o out/hello
default out/hello

With necc on PATH and its SDK configured, create the output directory and run these commands from the directory containing build.ne.

mkdir -p out
nebuild -j 2 build.ne
nebuild build.ne out/hello

What makes a recipe run again

nebuild records the recipe, declared inputs and their metadata, and the last successful build of each generated input. An output rebuilds when it is missing or when one of those records changes. Declare headers, compiler binaries and configuration files as inputs when they affect the output.

Recipes run through /bin/sh. Independent jobs can run in parallel. A lock serializes invocations that share the working directory.

Checking an unchanged target

On , nebuild checked one up-to-date target in a 2,048-rule manifest in 3.689 ms. The previous build took 22.597 ms. The parser now scans manifest bytes directly and prepares the recipe signature only for targets the runner visits.

Manifest sizeBefore (ms)nebuild (ms)GNU make (ms)Ninja (ms)
256 rules3.2180.8450.9872.612
2,048 rules22.5973.6894.1053.819

Each median covers 31 warm runs on one CPU. Every rule copied the same source to a different output. Each invocation opened its manifest and checked one previously built output. The harness verified its contents and timestamp after every invocation. Clean builds and parallel recipe execution were outside this timing.

Independent manifest timing

On 21 November 2026, twelve warm rounds repeated the unchanged-target check on one i7-9700K CPU. Every result retained the same output contents and timestamp.

Graph0441e93 (ms)60d1200 (ms)GNU make (ms)Ninja (ms)
256 rules3.861.051.702.34
2,048 rules28.124.703.923.89

Reading the larger manifest cost about 0.8 ms more than Ninja on this host. This comparison covers a single requested target.

Build nebuild

Clone the private nebuild repository with a GitHub account that has access. Build it with Nelua, Zig and the standalone Nelibc archive.

git clone https://github.com/Spaceghost/nebuild
cd nebuild
make NELIBC=/path/to/nelibc
make NELIBC=/path/to/nelibc test
make NELIBC=/path/to/nelibc install PREFIX="$HOME/.local"