Installation

Swerve can be installed in one of three ways; using a prebuilt binary, using Cargo or building from source. The last two options are very similar, with varying levels of hands-off-ness. The recommended install method is via the prebuilt binary, but these are only provided for macOS and Linux systems.

Pre-built Swerve

Swerve is built for each release automatically for x86 macOS and x86 Linux systems. Binaries are also only built for 64-bit systems; you will need to build from source if you want to run Swerve on a 32-bit system.

  1. Go to the downloads page and download the latest tarball of Swerve
  2. Extract the archive to some know path on your system (we'll refer to this as $OUTPATH)
    • If you're doing this from the command line, you can use tar -xzf $FILE.tar.gz to extract the archive. Alternatively, use a GUI program (your OS will most likely have one built in)
  3. Move the Swerve binary to some location accessible from your $PATH:
    • Add the extracted path to your $PATH: PATH="$PATH:$OUTPATH"
    • Move the binary to some location already in your $PATH: mv $OUTPATH/swerve /somewhere/in/path/swerve

You should now be able to invoke Swerve by typing swerve in your terminal. This will open swerve with the default options in the current directory (also taking into account any Swerve configuration files it finds). To start customising swerve, read about usage.

Install Via Cargo

All new Swerve versions are published to crates.io, allowing you to use Cargo to easily build and install it from source.

  1. Make sure that you have Cargo installed, preferably via rustup.
  2. Version 0.3.0 of Swerve was built against nightly-2018-06-18. It is highly recommended to use this exact versions to install Swerve
  3. Run cargo install swerve

You should now be able to invoke Swerve by typing swerve in your terminal. This will open swerve with the default options in the current directory (also taking into account any Swerve configuration files it finds). To start customising swerve, read about usage.

Build From Source

If you want to run Swerve on a system that doesn't have a version automatically built for it, or you need more customisation than installing via Cargo allows, you can always build Swerve from source. There are only a few additional steps required compared to installing from Cargo.

  1. Make sure that you have Cargo installed, preferably via rustup.
  2. Version 0.3.0 of Swerve was built against nightly-2018-06-18. It is highly recommended to use this exact versions to install Swerve
  3. Clone the Swerve git repository to somewhere accesible on your system; git clone https://github.com/Commander-lol/rust-swerve.git swerve
  4. Enter the Swerve directory; cd swerve
  5. Use cargo to build the production version; cargo build --release. You can add any custom arguments here.
  6. Move the resultant binary to somewhere accessible on your $PATH; cp target/release/swerve /somewhere/in/path/swerve

You should now be able to invoke Swerve by typing swerve in your terminal. This will open swerve with the default options in the current directory (also taking into account any Swerve configuration files it finds). To start customising swerve, read about usage.