Getting Started
XE can be installed either from a published release binary or by building from source.
Quick install
The fastest path on macOS and Linux is the hosted install script:
curl -fsSL https://xe-lang.vercel.app/install.sh | bashThis downloads the latest XE binary from GitHub Releases and installs it into ~/.local/bin by default.
Useful variants:
XE_INSTALL_DIR="$HOME/bin" curl -fsSL https://xe-lang.vercel.app/install.sh | bash
XE_VERSION="v0.1.2" curl -fsSL https://xe-lang.vercel.app/install.sh | bashIf you are on Windows, use the release zip from GitHub Releases for now.
Release binaries are published from the public GitHub repository, so the installer expects public release assets.
Build from source
XE depends on the Rust toolchain because the compiler emits Rust and uses rustc for final builds.
Requirements:
cargorustcgitif you are cloning the repository
Build the compiler:
git clone https://github.com/V8V88V8V88/XE.git
cd XE
cargo build --releaseThe compiler binary will be available in Cargo's release output directory.
Install that built binary into ~/.local/bin:
./target/release/xe installIf you want to build and install in one step from the repository checkout:
cargo run --release -- installIf xe is still not found after installation, add the install directory to your shell PATH.
Examples:
export PATH="$HOME/.local/bin:$PATH"set -Ux fish_user_paths $HOME/.local/bin $fish_user_pathsInstall through Cargo
If you prefer to install from the repository through Cargo:
cargo install --git https://github.com/V8V88V8V88/XE --bin xeRun your first XE file
Create hello.xe:
print("Hello, World!")Run it:
xe run hello.xeCompile a standalone executable
xe compile examples/hello.xe -o hello
./helloPrint generated Rust
If you want to inspect the code XE generates:
xe compile examples/hello.xeIf you use -o, XE will build a native executable instead of saving the Rust source:
xe compile examples/hello.xe -o helloDocs development
This docs site is its own small app inside docs/:
cd docs
npm install
npm run docs:devBuild the docs for deployment:
npm run docs:build