Installation
One command. No package-manager prerequisites, no other tools to install first.
One-liner install
Linux and macOS
curl -fsSL https://xslang.org/install | shVerifies the SHA-256 against the release sums file, then drops the xs binary into /usr/local/bin/. Requires sudo if that path is not writable. Override the location with XS_INSTALL_DIR=$HOME/.local/bin. After install:
xs --version
xs upgrade -- pull the latest release, replace this binary
xs uninstall -- removeWindows (PowerShell)
irm https://xslang.org/install.ps1 | iexInstalls to C:\xs\bin\ and adds it to the system PATH. Requires an elevated PowerShell session (run as Administrator).
Build from source
Needs gcc or clang and GNU make. No other build or runtime dependencies.
git clone https://github.com/xs-lang0/xs
cd xs
make
make installAvailable make targets:
make -- produces ./xs (or xs.exe on Windows)
make debug -- -g -O0 with AddressSanitizer + UBSan
make release -- -O3 with LTO, stripped
make test -- runs the full test suite
make install -- installs to /usr/local/bin/xs
make wasm -- produces xs.wasm via wasi-sdkVerify
xs --versionBare xs drops into the REPL. Type println("hello") and press Enter; type :quit to exit.