A language that compiles to C.
Maximum performance. Zero overhead. Full control.
package GAME
using IO
block global = 256MB
interface Damageable {
fn take_damage(i32 dmg)
}
struct Player : Damageable {
i32 hp
String name
fn take_damage(i32 dmg) {
hp -= dmg
if hp < 0 { hp = 0 }
print("{0} took {1} damage", name, dmg)
}
}
fn main() {
Player p = Player(100, "Felipe") @game
p.take_damage(20)
game.reset()
}
Compiles to pure C with #line directives. Every fn becomes static inline β zero call overhead.
Bump allocator (~3 cycles). No malloc/free. No GC. Reset a block in ~5 ns.
Swap code at runtime without restarting. Atomic function pointer swap. Inotify + dlopen.
Structs with methods, interfaces with vtbl dispatch, inheritance, impl blocks, all zero-cost.
Multi-file projects, nested packages (MATH.VEC2), export/private visibility, auto-resolution.
macro with $ interpolation, build {} compile-time eval, emit {} code gen, hygiene, varargs.
Seamless C interop: include, link, extern fn, @system. String β *u8 auto-conversion.
u8..u64, i8..i64, f32/f64, usize/isize. Bitfields (u4, i3). Overflow checked at compile time.
Dynamic arrays, fixed arrays, pointers, structs, unions, enums, match with guards, defer, sizeof/alignof.
let x: u32 = 0xFF
f32[16] matrix = {1.0}
int[] items
match value {
1 { print("one") }
2, 3 { print("multi") }
_ { print("default") }
}
defer { print("cleanup") }
// called when scope exits
*int p = &x
p += 1 // next element
isize d = q - p // element count
Compile to native code. Own your memory. Stay in control.