Install
Use a complete SDK with bin/, src/, and the tools. Standard-library sources are required to compile imports; placing a renamed compiler on PATH alone does not provide a complete development environment.
Native Installers (Recommended)
Xu provides standalone native Setup installer packages (zero Python, bash, or third-party dependencies) that configure persistent global environment variables so xu is immediately usable in any terminal across the system:
| Operating System | Recommended Package | Details |
|---|---|---|
| Windows | Download xu-v0.8.8-windows-x64-setup.exeor xu-setup-windows-x64.exe |
Self-contained offline installer. Double-click to launch the native GUI wizard (no WebView2 required) or execute .\xu-setup-windows-x64.exe -y in terminal. Automatically configures registry user Path and XU_ROOT. |
| macOS | Download xu-v0.8.8-macos-arm64.pkgor xu-setup-macos-arm64 |
Native macOS GUI package installer. Automatically installs to /usr/local/xu and sets up /etc/paths.d/xu for system-wide availability. Standalone unprivileged xu-setup-macos-arm64 CLI installer is also available. |
| Linux | Download xu-setup-linux-x64or xu-setup-linux-arm64 |
Native binary installer. Run chmod +x xu-setup-linux-x64 && ./xu-setup-linux-x64 -y to automatically extract the SDK and configure Shell profile environment paths. |
Offline SDK Archive Installation
If you downloaded a full SDK archive (.tar.gz on Unix or .zip on Windows) from the Download page or GitHub Releases, the native installer is bundled directly at the root:
# Windows: Double-click xu-setup.exe in File Explorer, or in terminal:
.\xu-setup.exe -y
# macOS / Linux: Run xu-setup directly in the extracted directory:
./xu-setup -y
The default installation directory is ~/.xu (macOS .pkg defaults to /usr/local/xu). Use --prefix /custom/path to customize the target directory. In automated CI pipelines, you may also use ./install.sh or .\install.ps1; for temporary evaluation, run source env.sh (or . .\env.ps1 in PowerShell).
Verify Global Environment
After installation, open a new terminal window (CMD, PowerShell, Terminal, or VS Code integrated terminal) and verify that the toolchain is globally active:
xu --version
xu env
xu doctor
Targets
| System | --target | Default artifact | Details |
|---|---|---|---|
| macOS | macos-arm64, macos-x64 | Mach-O, no suffix | Apple Silicon and Intel architectures |
| Linux | linux-arm64, linux-x64, linux-loongarch64, linux-riscv64, linux-arm32 | ELF, no suffix | Mainstream servers, LoongArch, and embedded Linux |
| Windows | windows-x64, windows-arm64 | PE, .exe | 64-bit x86 and ARM64 native executables |
| WebAssembly | wasm32 | Wasm binary, .wasm | Interactive browser sandboxes, edge runtimes, and WASI/embedded containers |
| Bare metal | thumbv7em-none, riscv32imac-none | Bare-metal firmware binary | OS-less embedded microcontrollers |
A supported target does not imply a published SDK asset or support for every library and desktop feature. See Status & Limitations.
Update an installation
Run xu up or xu update to directly download and install the official Release package for your system from GitHub. xu up --check checks for available updates without installing, and xu update --version <version> selects a specific version. Tools and the standard library are replaced after download and verification succeed. See CLI for options.
Verify compilation
xu check hello.xu
xu run hello.xu
xu build hello.xu --output hello
macOS / Linux executables already have execute permission. In PowerShell, prefer --output for output paths.
Environment and source builds
XU_ROOT selects the SDK or compiler checkout; XU_STDLIB_ROOT explicitly selects its src/. XUPATH adds search roots and does not replace external-module require: declarations. Keep xu-fmt, xu-doc, xu-map, xu-doctor, and xu-desktop beside xu in bin.
Sources are in the xu repository. make xu self-hosts with an existing hosted product seed and rebuilds the tools. A clean checkout requires a product seed and the bootstrap companion repository first. packages, examples, and vscode are maintained separately.