Repository navigation
v5.2.0 — Rail stands alone (no as/ld/codesign)
Rail's whole toolchain now stands alone — the compiler assembles, links, and ad-hoc code-signs itself, in pure Rail, in-process, with no Apple as, ld, or codesign anywhere in the build. v5.0.0 removed as/ld from the Linux ELF path; v5.2.0 closes the loop on the macOS host platform — including the ad-hoc signature arm64 requires — and extends it to FFI programs. The last external tool in Rail's build is gone.
Because Rail now owns every byte of the output — including the LC_UUID and section padding that ld randomizes — the self-compile is deterministic and bit-reproducible: the committed seed reproduces itself byte-for-byte (sha256 b02dd228…) in a single cycle. That upgrades attestation from tamper-evident to source-reproducible.
Highlights
- Pure-Rail AArch64 assembler (
tools/v5/asm.rail) — two-pass, whole-program__textlayout; gate-validated 1248/1248 instruction forms byte-identical toas, with the full compiler__text(651,184 bytes) byte-exact. - Pure-Rail Mach-O linker (
tools/v5/link_lib.rail) — bakes@PAGE/@PAGEOFFrelocations, builds the__data/__bss/__mod_initimage, emits classicLC_DYLD_INFOrebase + bind streams, stubs +__got, full symtab/dysymtab/indirect-symtab, then ad-hoc signs it (N-page signer). - In-process by default —
self_compilerail-links itself atRAIL_ARENA_MB ≥ 5000; below that (or with/tmp/.rail_force_as_ld) the originalas/ldpath runs, byte-for-byte unchanged. The committed seed is the rail-linked binary. - FFI stands alone too — multi-dylib linking (second
LC_LOAD_DYLIB+ per-import ordinal) linkslibsqlite3FFI binaries with nold;stdlib/sqlite.railgains prepared statements (prepare/bind/step/column/finalize) and zero-cost weak auto-linking. - 178/178 tests, byte-identical fixed point. Compiler behavior unchanged — this release is the build pipeline, not the language.
Reproducible attestation (verified)
The rail-link path emits every byte itself — no host as, ld, or SDK — so the build is host-independent. The seed compiled on two independent machines, an Apple M4 Pro (macOS 26.3) and an M1 Ultra (macOS 26.4.1), is byte-identical: sha256 b02dd2284a9220c29f9e984b5e3c898a7d255751263a6547e50c7c2a8abe0bb4. Rebuild it yourself and check the hash.
Full notes: CHANGELOG.md.