cf074bec897045ba4a6d9e68a4239f7c5dffcab4
- Generate tagged unions in C backend for enums with data
- Add HirEnumVariant type with fields and namedFields
- Support _Tag and _Data field access in sema
- Support enum variant constants (Result_Ok, Result_Err)
- Support _Data union field access (Ok_0, Err_0, etc.)
- Add algebraic_enums.bux example
Example:
enum Result {
Ok(int),
Err(String)
}
let r: Result = Result { tag: Result_Ok };
r.data.Ok_0 = 42;
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%