Zero-VM execution
The kernel hands control straight to your code. Nothing runs before it, nothing runs beside it.
- Virtual machine
- Garbage collector
- libc and crt runtime
- Exception unwind tables
- Your program, then the kernel
A readable systems language that compiles straight to native code. No VM, no garbage collector, no libc.
enum FD
Stdin
Stdout
Stderr
@link("./sdk/src/write.s")
op write(FD fd, const str val, const int size): void
@link("./sdk/src/exit.s")
op exit(const int val): void
write(Stdout, "Hello World from AzLang!\n", 25)
exit(0)
Why AzLang
The most resilient machine has no unnecessary moving parts. AzLang removes the layers between your code and the silicon.
The kernel hands control straight to your code. Nothing runs before it, nothing runs beside it.
Blocks by indentation. No braces, no semicolons.
const by default, var when state must change.
Include any assembly source with @link and call it as a native op.
No GC pauses or hidden threads. Inspect it all with gdb and strace.
opsParameters declare their own mutability. const passes by value, var passes a mutable reference.
op add(const int a, const int b): int
return a + b
op multiply(var int x, const int factor): int
return x * factor
op log_message(const str msg, const int len): void
write(Stdout, msg, len)
if, elif, else, while, for ... in for iteration, and a bare loop that runs forever.
var int i = 0
while i < 10
i = i + 1
const list<int> items = [10, 20, 30]
for items in item
// use item
loop
if should_stop
break
Every primitive lowers to a concrete machine word. Template strings are built in.
const int count = 42
const bigint offset = 1000000000
const float ratio = 0.75
const char initial = 'A'
const str name = "AzLang"
const str msg = `Welcome to ${name}`
Variants are resolved at compile-time as immediate constants. No memory loads, no runtime lookup tables.
enum FD
Stdin
Stdout
Stderr
write(Stdout, "Hello\n", 6)
// emitted assembly: the variant is an immediate, no lookup table
mov rax, 1
push rax
lea rax, [main_str0]
push rax
mov rax, 6
push rax
pop rdx
pop rsi
pop rdi
call write
The compiler
A single self-contained compiler takes your source to a native binary in one fasm pass. No daemons, no object files, no separate linker.
.azASTtypes.asmfasmELFReliability comes from engineering unnecessary valves and moving parts out of the machine entirely.
The AzLang Doctrine
AzLang's only dependency is fasm — one small assembler binary. Install it and start writing.
sudo pacman -S azcli