User-facing install layout for the xo toolchain. Aligns with
ADR 0014: tool-owned trees use .xo
(or the xo XDG application name), not a parallel echo/… brand under XDG.
| Script | Role |
|---|---|
scripts/install.sh |
install / upgrade / uninstall / doctor |
scripts/uninstall.sh |
thin wrapper → install.sh uninstall |
Published builds are prereleases. The current tag is
v0.0.1-alpha.12.
from-release with no tag installs the newest published prerelease (including
alphas). Pass a tag to pin. GitHub /releases/latest only resolves a
non-prerelease and 404s today.
No Rust toolchain is required for the install itself; clang is still needed
to run/build Echo programs.
curl -fsSL https://raw.githubusercontent.com/modoterra/echo/main/scripts/install.sh \
| bash -s -- from-release
# Pin this tag
curl -fsSL https://raw.githubusercontent.com/modoterra/echo/main/scripts/install.sh \
| bash -s -- from-release v0.0.1-alpha.12
# From a checkout
./scripts/install.sh from-release
./scripts/install.sh doctorAssets on v0.0.1-alpha.12:
| Archive | Host |
|---|---|
xo-linux-x86_64.tar.gz |
Linux x86_64 |
xo-macos-arm64.tar.gz |
Apple Silicon |
xo-windows-x86_64.tar.gz |
Windows x86_64 |
Each archive contains bin/xo (bin/xo.exe on Windows),
bin/libecho_runtime.a or bin/echo_runtime.lib, and std/. Windows AOT
xo run is not first-class yet. See docs/ci.md for the release workflow
matrix.
Ensure ~/.local/bin (or $XO_BIN_DIR) is on your PATH.
xo --help
xo home # package cache root ($XO_HOME)# Release build + install under XDG (default when Cargo.toml is present)
./scripts/install.sh
# Or explicitly
./scripts/install.sh install
# Show where things went
./scripts/install.sh doctorDebug build (faster, for toolchain hacking):
CARGO_PROFILE=debug ./scripts/install.sh install| Path | Role |
|---|---|
$XDG_DATA_HOME/xo/toolchains/<version>/ |
One installed release (bin/xo, std/, …) |
$XDG_DATA_HOME/xo/current |
Symlink → active toolchain |
$XO_BIN_DIR/xo (default ~/.local/bin/xo) |
PATH entry → current/bin/xo |
Default $XDG_DATA_HOME is ~/.local/share.
Each toolchain directory contains:
toolchains/<version>/
bin/xo
std/… # co-installed privileged std sources
version
installed_at
xo discovers std/ via the install prefix: when the binary is
<prefix>/bin/xo, the resolver also treats <prefix> as a package root if
<prefix>/std exists. Optional override: $XO_INSTALL_ROOT.
| Path | Role |
|---|---|
$XO_HOME |
User .xo root |
$XO_HOME/packages/<id>/<version>/ |
Fetched packages (xo get) |
$XO_HOME resolution (same as xo home):
$XO_HOMEif set- else
$XDG_CACHE_HOME/.xo - else
~/.cache/.xo
Project .xo/cache/ is IR/AOT only — never package downloads.
| Path | Role |
|---|---|
$XDG_STATE_HOME/xo/ |
Durable state (e.g. REPL history) |
$XDG_CONFIG_HOME/xo/ |
Config (reserved; empty by default) |
Defaults: ~/.local/state/xo, ~/.config/xo.
# From checkout: rebuild + install new version dir
./scripts/install.sh upgrade
# Prebuilt: re-fetch newest published prerelease (or pin a tag)
./scripts/install.sh from-release
# ECHO_RELEASE=v0.0.1-alpha.12 ./scripts/install.sh from-releaseUpgrade path:
- Obtain a new
xo(build from the checkout or download a release tarball). - Install into a new version directory under
toolchains/<version>/(staging dir, then rename). - Atomically repoint
current→ the new version. - Refresh the PATH symlink.
- Keep previous version directories (rollback: repoint
currentmanually).
Force a version directory name:
ECHO_VERSION=v0.0.2 ./scripts/install.sh upgrade# Toolchain + PATH link only; keep package cache and state
./scripts/uninstall.sh
# or
./scripts/install.sh uninstall
# Also remove $XO_HOME (packages), state, and config
./scripts/uninstall.sh --purgeUninstall removes:
$XO_BIN_DIR/xoonly if it is a symlink into the data install root$XDG_DATA_HOME/xo/(all toolchains +current+ manifest)
--purge also removes $XO_HOME, $XDG_STATE_HOME/xo, and $XDG_CONFIG_HOME/xo.
| Variable | Meaning |
|---|---|
XO_HOME |
User package/cache .xo root |
XO_BIN_DIR |
Directory for the xo PATH link |
XO_INSTALL_ROOT |
Extra std package root (optional) |
ECHO_REPO |
GitHub owner/name for prebuilts (default modoterra/echo) |
ECHO_RELEASE |
Release tag for from-release (unset = newest published prerelease) |
ECHO_VERSION / XO_VERSION |
Toolchain version directory name |
GITHUB_TOKEN / GH_TOKEN |
Optional auth for GitHub API / downloads |
CARGO_PROFILE |
release (default) or debug (checkout builds) |
XDG_DATA_HOME / XDG_CACHE_HOME / XDG_STATE_HOME / XDG_CONFIG_HOME |
Standard XDG bases |
./scripts/install.sh doctor
./scripts/install.sh pathsDay-to-day language work still uses the git workspace:
cargo build -p xo
./target/debug/xo run examples/misc/hello.echoThe install script is for a user-facing xo on PATH with co-located
std/, separate from per-project .xo/cache/.