Skip to content

ourc v0.1.1

Latest

Choose a tag to compare

@jaredef jaredef released this 02 Nov 21:43
· 2 commits to main since this release

ourc v0.1.1: a Rust compiler grown from 269 bytes of hand-written machine code. https://ourc.dev

What's new

  • ourc's source is now valid Rust: rustc compiles it, and the rustc-built ourc emits IR byte-identical to the hex-built ourc on ourc's own 51,210-line source. That is a diverse double compilation of ourc against a fully independent compiler.
  • To get there, the source defects that the tower's compilers accepted and rustc rejects were fixed: a field declared twice, refusal code in the wrong function, writes through &self, and uses after a move.
  • No change in behaviour: rustc 1.99.1 tests/ui results are identical to v0.1, test for test.

Numbers

  • rustc 1.99.1 tests/ui: 10,837 of 20,072 passed (54%); 2,653 of 7,913 valid programs compiled correctly; 0 wrong answers among the 3,676 run-pass programs compared with rustc.
  • Compiles its own source to a byte-identical fixed point.

ourc sha256: 9d5fde72d8e5a4929bd929c2165b339c2adf054ab8d80672f0252a2d74074078

Built from the hand-written hex with LLVM 22.1.8, GCC 16.2.1, binutils 2.47 and glibc 2.44. To rebuild it rather than trust this binary, see Verify it yourself.

The binary needs x86-64 Linux, llc (LLVM 16 or newer) and cc. See README.md and LIMITATIONS.md in the tarball.