XU XUv0.8.8
中文

Docs

Get started

Xu is a GC-free systems language: thin syntax, ownership and borrow, static AOT. Sources are UTF-8 .xu files.

  1. Install native xu via native Setup installers or SDK archives (or try the WebAssembly Playground in browser without installing)
  2. Work through tutorials 01–16 (starting from 01 hello)
  3. Inspect the 47 Full Cross-Language Benchmarks
  4. Open the language spec when you need the rules

Symbols you will recognize

StatementMeaning
<< / << exprreturn
>> exprthrow errors.Error
or (err) { }catch
<<< exprprocess 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/.