Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How I Built a Systems Programming Language in 100% Pure x86-64 Assembly (And Made It Self-Host)

Description and use

Rubix is a systems language compiler written entirely in x86‑64 assembly, 55 KB in size, compiling source in 0.15 s and launching binaries in 0.3 ms using <2 MB RAM. It shows that a modern statically typed language can be built without C, libc, or LLVM, and it self‑hosts.

Problem

Build a fast, modern, statically typed systems programming language without relying on C, libc, or LLVM, and implement the compiler in pure x86‑64 assembly.

Outcome

Rubix demonstrates that a modern, statically typed systems language can be built entirely in assembly, achieving a 55 KB compiler, sub‑0.15 s compile time, and sub‑0.3 ms binary start time, while successfully self‑hosting.

Workflow

  • 1. Write a 100% pure x86‑64 assembly compiler that links against no libc.
  • 2. Implement OS‑specific syscalls for console I/O, process management, and memory allocation on Linux, Windows, and macOS.
  • 3. Compile Rubix source (.ix) with the assembly compiler to produce native binaries.
  • 4. Build a Rubix‑written bootstrap compiler (rubixc_bootstrap) that parses, type‑checks, and emits assembly.
  • 5. Use the native compiler to compile the bootstrap compiler into a native executable (rubixc_native).
  • 6. Run the native executable to compile Rubix source, verifying that all 17/17 regression tests pass.
  • 7. Publish the project on GitHub and Dev.to to attract contributors.

Evidence

The entire native compiler binary is ~55 KB

Source

It compiles from source assembly in under 0.15 seconds

Source

Emitted binaries start up in 0.3 ms with less than 2 MB of RAM

Source

All 17/17 core regression test suites pass cleanly

Source

  • Record date: 2026-10-19T11:41:03.159Z