8e74215378bf3f305111c2fae6fb35bd5a8d1e1a
- Phase 3: High-Level IR (HIR) with lowering from AST - Method call desugaring (obj.method() → Type_method(obj)) - if/else, while, loop, break, continue lowering - struct, enum, function lowering - 8 HIR tests passing - Phase 5A: C backend code generation - Type mapping (Bux types → C11 types) - Expression and statement emission - Struct, enum, function generation - C main() wrapper for Bux Main() - Runtime shim (stdlib/runtime.c) - bux_alloc, bux_free, bux_print, bux_panic - BuxString, BuxSlice types - Bounds checking, division by zero - Build integration - bux build: lex → parse → sema → HIR → C → cc - bux run: build + execute - bux clean: remove build directory - Parser fixes - Newline handling in struct, enum, extend, interface blocks - self keyword as expression and parameter name - Sema improvements - Method resolution (extend blocks) - Interface conformance checking - collectGlobals made public - All 70 tests passing (25 lexer + 16 parser + 21 sema + 8 HIR) - End-to-end: Bux programs compile to native ELF64 binaries
Bux Programming Language
Status: Bootstrap phase — compiler written in Nim, targeting self-hosting.
Bux is a fast, compiled, strongly-typed systems programming language inspired by Rux. The long-term goal is a self-hosted compiler with a minimal runtime, native x86-64 backend, and modern tooling.
Quick Start
# Build the bootstrap compiler (Nim)
make build
# Create a new project
bux new hello
# Build and run
bux run
Syntax Preview
import Std::Io::PrintLine;
func Main() -> int {
let message: *char8 = c8"Hello, Bux!";
PrintLine(message);
return 0;
}
Roadmap
See PLAN.md for the full roadmap to self-hosting.
License
MIT
Languages
C
74.6%
Nim
23.4%
HTML
1.2%
Makefile
0.3%
Go
0.3%