Docs / Tutorial
01 · Program skeleton
Smallest program: print a line and exit with << 0. No return keyword. No semicolons.
Source
@main
fn main() int {
println("Hello, Xu!!!!!!!!!")
<< 0
}Build (from the language repo root; swap the binary for your platform):
xu run examples/01_hello/main.xu
# or: xu build examples/01_hello/main.xu
# default artifact is ./main on mac/linux, ./main.exe on Windows
Run from the separate examples repository root; source files live under examples/.