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

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

Описание и применение

Rubix – это компилятор системного языка, написанный полностью на x86‑64 ассемблере, размером 55 КБ, компилирующий исходники за 0,15 с и запускающий бинарки за 0,3 мс с использованием менее 2 МБ ОЗУ. Проект демонстрирует, что можно создать современный статически типизированный язык без C, libc и LLVM, а также самохостинг.

Задача

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.

Результат

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.

Рабочий процесс

  • 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.

Доказательства

The entire native compiler binary is ~55 KB

Источник

It compiles from source assembly in under 0.15 seconds

Источник

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

Источник

All 17/17 core regression test suites pass cleanly

Источник

  • Дата записи: 2026-10-19T11:41:03.159Z