Docs
Get started
Xu is a GC-free systems language: thin syntax, ownership and borrow, static AOT. Sources are UTF-8 .xu files.
- Install native
xuvia native Setup installers or SDK archives (or try the WebAssembly Playground in browser without installing) - Work through tutorials 01–16 (starting from
01 hello) - Inspect the 47 Full Cross-Language Benchmarks
- Open the language spec when you need the rules
Symbols you will recognize
| Statement | Meaning |
|---|---|
<< / << expr | return |
>> expr | throw errors.Error |
or (err) { } | catch |
<<< expr | process exit |
<- | break (statement start, no operand) |
-> | continue |
Imports are #errors. An executable package starts with @main. Spawn with xu f(args) and pass values on chan.
Modules and external packages
Declare dependencies in xu.xun, then install, lock, and vendor them。The packages module provides 29 external packages。
Tutorial commands run from the separate examples repository; paths start with examples/.