BuildLang BLDLNG
A function's type lists what it may touch. The compiler checks it, proves your laws and builds native code through C.
BuildLang is a systems programming language in which a program declares what it is allowed to touch. The compiler checks those declarations and its memory rules, then emits native code through C. It ships with a CLI, editor support, two-way C integration and experimental shader output.
cargo install buildlang --version 1.15.0 --locked
Release 1.15.0, 14 November 2026. Each figure below opens to the pull request it was read from, and names the release that first carried that work, or says it is on main after this release or still in review.
The registry
First released in 1.11.0 (#137); first released in 1.12.0 (#156, #160).
Our own tools, rewritten in BuildLang and checked byte for byte against the originals they replace.
buildc pkg build
sha256, from Flywheel: Published with the package manager in 1.11.0, pure BuildLang.
- from Flywheel
- from build-color
- from this site's tools
- the standard library
- from Low Water, AGPL-3.0-only
The index, with a SHA-256 for every version: registry/index.json.
190 of 190 cases of canonical-record are byte-identical with Flywheel's RFC 8785 original
Also 75 of 75 published vector fields and 8,000 random documents. buildlang #156, merged 9 November 2026 (b1a4df2), first released in 1.12.0.
34 of 34 Sharma CIEDE2000 pairs from color match build-color exactly
608 random pairs agree within 2.84e-14. JzAzBz, ICtCp, HSV and the wide-gamut matrices are left for a later wave. buildlang #156, merged 9 November 2026 (b1a4df2), first released in 1.12.0.
0 to 40 leaves merkle matches Flywheel's RFC 6962 tree byte for byte on every root, inclusion and consistency proof
Published with the package manager: publish, resolve, lock and build offline, with a SHA-256 content hash per version. buildlang #137, merged 8 November 2026 (585ed28), first released in 1.11.0.
BL0702 is the error a tampered package gets; two clean copies build the same C from one lock
compiler/tests/pkg_flow.rs also plants an unmeetable range (BL0701), a stale lock (BL0703) and a republish (BL0707). buildlang #137, merged 8 November 2026 (585ed28), first released in 1.11.0.
4 Low Water kernels joined the public registry under AGPL-3.0-only
lw-hash, lw-codec, lw-cbegin and lw-moves, each checked against the game's own files; the registry now holds 14 versions, each matching its index. buildlang #160, merged 9 November 2026 (217224f), first released in 1.12.0.
Laws and contracts
First released in 1.12.0 (#138).
A law is a property you state beside the code, such as a function never returning less than its input. The compiler proves it, refutes it with a counterexample, or says why it cannot tell; it does not test by sampling alone.
buildc verify laws.bld
10 of 10 false laws with rare counterexamples stay unproved
A planted mutant prover, one that treats 0 >= 0 as a contradiction, fails that set. The prover is sound and incomplete: every step only weakens what it knows. buildlang #138, merged 9 November 2026 (25d1171), first released in 1.12.0.
12 proved, 4 refuted on our own laws: the integer rules of DETMATH (BuildLang's deterministic maths), the trace codec and conservation laws
All four refutations are planted. buildlang #138, merged 9 November 2026 (25d1171), first released in 1.12.0.
12 of 13 of Bend 2's laws, ported, are proved
The unknown one, add_comm over a recursive add on all of u32, needs induction the prover does not do. No comparison with Bend or any other verifier on a shared benchmark is claimed. buildlang #138, merged 9 November 2026 (25d1171), first released in 1.12.0.
The whole account: docs/VERIFY.md on main.
Translation validation
First released in 1.12.0 (#161, #162).
Translation validation means proving, function by function, that the C we emit does what its source says: the same traps, the same results. It checks each compiled program, not the compiler for every program.
buildc tv program.bld
31 of 38 functions inside the checked subset are certified in tests/programs, and 22 of 26 in the standard library
The subset is integers up to 64 bits and bool, with branches, loops and calls. Most functions fall outside it because they print or use strings, floats or structs. buildlang #161, merged 9 November 2026 (6c90a98), first released in 1.12.0.
3 of 3 adding functions lose their certificate when a planted switch turns + into - in the C backend
The other six stay certified. A wrong variable map, a wrong loop head and tampered C are each refused. buildlang #161, merged 9 November 2026 (6c90a98), first released in 1.12.0.
1 bug found by the checker in the compiler, and fixed: an unannotated integer compared with an i64 was emitted as 32 bits
The program passed buildc check and aborted at 2^31; the checker refused the function. The fix types the binding from what the checker inferred. buildlang #162, merged 9 November 2026 (5bb8fad), first released in 1.12.0.
Parallel by default
First released in 1.11.0 (#136).
par_for and par_map run on every core, and the checker proves from the source that the body is safe, so the result matches the serial loop byte for byte.
The parallel call is written out: BuildLang checks its safety, and does not find parallelism on its own.
BUILD_PAR_THREADS=8 buildc run program.bld
5.34x n-body kernel speed-up at 8 threads, 95% interval 5.07 to 5.63
Per-pixel shading 5.87x [5.57, 6.05]; the Low Water 40-fight corpus 5.09x [4.94, 5.37]. Measured on an i7-13700KF shared with GPU training, 10 rounds. The whole n-body process runs 3.20x faster, because its output loop is serial. buildlang #136, merged 8 November 2026 (bbcf9dd), first released in 1.11.0.
90 of 90 parallel runs printed the same bytes as the serial run
Before the fix to the runtime's shared formatting buffers, a control corrupted 2 strings in 1 of 5 runs at 3 threads. buildlang #136, merged 8 November 2026 (bbcf9dd), first released in 1.11.0.
The whole account: docs/PARALLEL.md on main.
Into C, and out of it
First released in 1.11.0 (#135).
Low Water's rules are written in BuildLang and linked into raw-native's C++ host through a plain C header.
16 of 16 checks of raw-native's own C++ test pass against the BuildLang library, as they do against the C++ module
A planted threshold fails 1. The story expression language is not ported: a record that needs it makes lw_rules_create refuse it with an error naming the record. buildlang #158, merged 9 November 2026 (3c7cc54), first released in 1.12.0.
12 of 12 DETMATH goldens hold (DETMATH: BuildLang's deterministic maths, the same bits on every machine, with fast-math shortcuts off), and 40 of 40 combat traces match the game's own corpus
The moves file builds to 168,234 bytes, identical to the golden. Both planted trace faults are caught. buildlang #158, merged 9 November 2026 (3c7cc54), first released in 1.12.0.
34 of 34 held-out tasks pass in each of two samples, Wilson 95% 0.90 to 1.00
The tasks were sealed before any generator saw them. Both samples are two draws of one model with one prompt, and the task writer also wrote the compiler changes, so the tasks may sit closer to the docs than an outside writer's would. buildlang #158, merged 9 November 2026 (3c7cc54), first released in 1.12.0.
The whole account: docs/LANGUAGE-COMPLETE.md on main.
BuildDB moves in
First released in 1.11.0 (#118, #119).
BuildDB is the database written in BuildLang. The compiler already writes a program into it as tables you can query; the database itself is moving into the language's repository.
The move is not on GitHub yet, so nothing here links to it.
buildc bql query prog.bld "SELECT DISTINCT function FROM effects WHERE effect = 'Network'"
4 tables from one program: functions, calls, effects and items, built from the compiler's own analysis
bql export writes them in BuildDB's file format, so its full SQL dialect runs over a program; bql query runs a subset in process and names BuildDB for the rest. buildlang #118, merged 4 November 2026 (0caed2d), first released in 1.11.0.
35 of 35 sampled renames agree with a full rebuild, and 1 is refused
bql verify rebuilds the store and compares it table by table. No incremental view ships without sampled agreement against a rebuild, and two planted faults are caught. buildlang #119, merged 5 November 2026 (0246f5b), first released in 1.11.0.
The first step
Choose what the function may touch and watch it build or fail.
With scripts on, this is a function you can change: choose what it declares and see whether it builds.
The function above follows BuildLang's rule in the page itself: read_file needs FileSystem, println! needs Console, and effects join with +. The messages copy the wording of the captured run below. The rule is written down in docs/EFFECTS_GUIDE.md.
Captured from buildc check
fn load_config() {
read_file("ops.toml"); // reaches the filesystem
}
$ buildc check missing_effect.bld
function `load_config` performs effect `FileSystem` but does not declare it
help: add ~ FileSystem to the signature
fn load_config() ~ FileSystem { read_file("ops.toml"); }
$ buildc check load_config.bld --receipt receipt.json
Type checking... OK
The language guide goes on from here: the getting-started guide, the source.
Verified 14 November 2026: the release and its date from GitHub, and crates.io lists 1.15.0; the merge state of every linked pull request from GitHub on the same day; each figure read from the body of the pull request it links.