Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Building

This page shows how to build Chassis from a checkout, on Linux, macOS or Windows.

Requirements

  • Rust 1.89 or later
  • A C compiler (for some dependencies)
  • Git

Clone

git clone https://github.com/tanvincible/chassis.git
cd chassis

Build

Build the project in release mode:

cargo build --release

The compiled library will be in target/release/.

For development builds without optimizations:

cargo build

Checks

Run the linter and the formatter as CI does, and fix any warning before you open a pull request:

cargo clippy --all-features --all-targets -- -D warnings
cargo fmt --all -- --check

Platforms

Linux

No special setup required. The build uses standard glibc.

macOS

Xcode command line tools are required for the C compiler:

xcode-select --install

Windows

Install Visual Studio Build Tools or the full Visual Studio IDE. The Rust installer will detect and use the MSVC toolchain automatically.

Cross-compiling

Chassis runs on x86-64 and ARM64. To build for ARM on an x86 machine:

rustup target add aarch64-unknown-linux-gnu
cargo build --target aarch64-unknown-linux-gnu --release

Test on ARM hardware too: an emulator may not catch alignment mistakes.