Skip to content

Arimo v1.0 — First Self-Hosted Native Compiler

Latest

Choose a tag to compare

@egecanakincioglu egecanakincioglu released this 30 May 23:08
· 37 commits to main since this release

Arimo v1.0 — First Self-Hosted Native Compiler

The Arimo v1.0 compiler is written entirely in Arimo and compiles itself.
This release marks the first stable, deterministic self-hosting milestone.


Self-Hosting Chain (Verified)

S0 (Rust/LLVM) → S1 → S2 → S3 → S4
                 ↑ byte-identical SHA256 ↑

Every compiler stage produces identical output — the compiler is fully deterministic.


ARC Memory Management (Complete)

Automatic Reference Counting with full ownership tracking:

Feature Description
Retain/Release Inline IR helpers with null guards
Assignment a = b and obj.field = val — retain new, release old
Scope Exit Auto-release all tracked variables at block/method end
Return Ownership Returned values retained before callee scope unwind
Break/Continue Loop scope unwind on escape
Recursive Teardown Freeing an object releases all its ref-type fields
Inheritance Chain Parent class fields released during teardown

Technical Highlights

  • IRLower — 2,704-line IR lowering from AST to Arimo IR
  • RegAlloc — Linear-scan register allocator (7 registers)
  • ELFWriter — Linux ELF64 native binary generation
  • PEWriter — Windows PE32+ native binary generation
  • Self-contained — No LLVM, no GCC required at runtime

Platform Support

Platform Format Status
Linux x86-64 ELF64 ✅ Full
Windows x86-64 PE32+ ✅ Full

Built-in APIs

API Status
IO.println() / IO.print() ✅ String + Integer
Env.platform() ✅ Returns "linux" or "windows"
Env.exit(code) ✅ Process exit
Env.args() 📋 Planned v1.1
Env.exePath() 📋 Planned v1.1

Test Suite

31/31 tests pass: 17 core language tests + 14 ARC memory tests


Known Limitations (Non-blocking)

  • Env.args() and Env.exePath() not yet implemented
  • Inheritance syntax (extends) in parser not yet complete
  • Interfaces, enums, generics, pattern matching in parser but not lowered
  • No cycle collector (ARC limitation, documented)

V1.1 Roadmap

  • Env.args() + Env.exePath() — startup ABI support
  • __this → ownership metadata refactor
  • Inheritance parser support (extends)
  • RETURN INDEX/DEREF retain

V1.2+ Roadmap

  • Interface + enum lowering
  • Generic monomorphization
  • Pattern matching lowering
  • Lambda/closures
  • Exception lowering (try/catch/finally)
  • Cycle collector / weak references

Installation

Linux:

tar -xzf arimo-v1.0-linux-x64.tar.gz
cd arimo-linux-x64 && sudo ./install.sh
arc build

Windows:

Expand-Archive arimo-v1.0-windows-x64.zip
cd arimo-windows-x64
.\arc.exe build

Repository