AOT / ZIG 0.16 / SINGLE-FILE OUTPUT
.a7 → parse → check → zig → binary
A7
AOT compiler: .a7 source to a native binary via Zig 0.16.
Python compiler, no runtime. One Zig file out. Source recursion rejected at compile time.
- Examples
- verified
- Target
- Zig 0.16
- Output
- 1 file
- Recursion
- banned
§02 · Documentation
Read in
order.
Nine pages grouped by task: install first, then language and compiler reference, then project status and agent fetch paths.
Open Start ↗Reference
02 Language Syntax and rules for the A7 language surface that examples use today. 03 Stdlib Virtual stdlib modules registered in the compiler today. 04 Compiler Compiler pipeline, CLI modes, exit codes, and Zig backend contract.§03 · Language
Syntax from
working examples.
Top-level bindings with ::, typed functions, structs, and iterative loops. See examples/037_language_tour.a7 for a full walkthrough.
- :: module and const binding
- fn typed functions, explicit ret
- for indexed and value iteration
- ret explicit return
// Functions in A7
io :: import "std/io"
// Typed function with a single return value
add :: fn(x: i32, y: i32) i32 {
ret x + y
}
// Iterative — A7 source recursion is banned
factorial :: fn(n: i32) i32 {
result := 1
for i := 2; i <= n; i += 1 {
result *= i
}
ret result
}
main :: fn() {
io.println("5 + 7 = {}", add(5, 7))
io.println("6! = {}", factorial(6))
}
§04 · Toolchain
Compile and
verify.
Run the compiler through semantic checks, emit Zig, and build with the host toolchain. Full gates are on the Release page.
$ uv run a7 examples/001_hello.a7 --mode compile [compile] tokenize ok [compile] parse ok [compile] name-resolve ok [compile] type-check ok [compile] safety ok [compile] emit zig ok -> examples/001_hello.zig $ zig run examples/001_hello.zig Hello, World!
$ ./run_all_tests.sh [pytest] passed [examples e2e] ok [error stage matrix] ok [docs style] ok release gate: green
$ curl -fsSL https://code5717.github.io/a7-py/llms.txt # A7 Docs — compact index of raw markdown pages ... $ curl -fsSL https://code5717.github.io/a7-py/docs/language.md # Language ... See /a7-py/agent-usage/ for fetch order and agent rules.