Building exa from source

exa is open-source, and you can build your own version if you want.

If you’re interested in contributing to exa’s development or adding features, then the Vagrant development environment might make things easier for you.

Installing Rust

exa is written in Rust, so before you do anything else, you’ll need to get a Rust compiler installed.

The easiest way to get started with Rust is to install Rustup, which can download and install Rust, the Cargo package manager and build tool, and manage updates to both components. There’s a shell command to install it, as well as other installation methods.

Installing other dependencies

exa needs two other things to work: libgit2, a Git library, and CMake, a build system needed to use libgit2 in Rust.

Your OS’s package manager will almost certainly provide packages for both of these.

If you can’t install them, though, you can opt out of exa’s Git functionality by passing --no-default-features to the Cargo commands below.

Getting the exa source

The latest exa source code lives on GitHub:

git clone https://github.com/ogham/exa.git

You can also get the code as a Zip file.

Building exa

Once you’ve got the code and set up your environment, you can use Cargo to build exa:

cargo build --release

And a runnable binary will appear in the target/release directory. You can “install” exa permanently by copying this binary to a directory inside your $PATH.

The --release flag tells Rust to build the binary with more optimisations and less debugging information, which is usually what you want if you’re not trying to develop exa.