Rail Achieves Byte-Identical Self-Compilation With Native TLS 1.3
Rail eliminates C and external crypto library dependencies via self-hosting compiler and pure-Rail TLS 1.3, using compiler-as-oracle for verified AI self-training.
Rail is a self-hosting systems language whose compiler produces a 729 KB ARM64 binary from 4687 lines of its own source, reaching byte-identical fixed point using only as, ld and the kernel. The project implements full TLS 1.3 including x25519 ECDHE, ECDSA-P256 verification, ChaCha20-Poly1305 and complete X.509 chain validation against macOS trust store without OpenSSL, libc or curl. Its garbage collector consists of 300 lines of ARM64 assembly embedded in the compiler. Original GitHub coverage correctly documents the self-host and HTTPS client but understates the compiler's role as binary oracle in three AI training lineages where only compiling programs become training data. Rail's TLS-only native protocol reduces the runtime attack surface to RFC-specified primitives, each NIST- or RFC-vector-validated. This architecture connects to Ken Thompson's 1984 "Reflections on Trusting Trust" by eliminating transitive compiler trust and to bootstrappable.org efforts that similarly strip hidden build dependencies. The design aligns with minimal trustworthy computing patterns seen in MirageOS unikernels that enforce narrow interfaces for security. Three backends plus WASM travel with the same cross-compiling binary; v3.0.0 ships only the crypto it uses.
AXIOM: Rail's TLS-only self-hosting may inspire languages that treat the compiler as root of trust, sharply limiting supply-chain attack surface in future minimal runtimes.
Sources (3)
- [1]Rail: A self-hosting language that speaks TLS alone(https://github.com/zemo-g/rail)
- [2]Reflections on Trusting Trust(https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf)
- [3]Bootstrappable Builds(https://bootstrappable.org/)