Skip to main content

Prerequisites

Before building Hoot, ensure you have the following dependencies installed:
  • Rust 1.70 or later
  • OpenSSL development libraries
  • Perl and some libraries (required for OpenSSL compilation)

Platform-specific dependencies

On Linux, you’ll also need the following libraries:
  • Wayland development libraries
  • libxkbcommon
  • libGL
  • X11 development libraries (libX11, libXcursor, libXrandr, libXi)
  • fontconfig

Building with Cargo

Hoot uses standard Cargo build commands for compilation.
1

Clone the repository

git clone <repository-url>
cd hoot
2

Build the project

cargo build
The release build is optimized for performance and should be used for production use.
3

Run the application

cargo run

Building with Nix

If you have Nix with flakes enabled, you can use the provided Nix development environment.
1

Enter the development shell

nix develop
This will set up a shell with all necessary dependencies, including:
  • Rust toolchain with rust-analyzer and rust-src
  • Platform-specific libraries
  • Build tools (pkg-config, perl, makeWrapper)
2

Build using Cargo

Once inside the Nix shell, use standard Cargo commands:
cargo build --release
3

Run the application (alternative)

You can also run Hoot directly using Nix:
nix run

Nix packages

The flake provides several package outputs:
  • default - The main Hoot package (wrapped with nixGL on Linux)
  • hoot-unwrapped - Hoot without nixGL wrapper
  • devenv-up - Development environment setup script
  • devenv-test - Test runner script

Build features

Hoot supports optional feature flags during compilation:

Profiling

Build with profiling support enabled:
cargo build --features profiling
See the profiling guide for more information on using the profiler.

Troubleshooting

OpenSSL errors

If you encounter OpenSSL-related build errors, ensure you have the OpenSSL development libraries installed:
sudo apt-get install libssl-dev pkg-config

Graphics library errors on Linux

If you encounter errors related to Wayland or X11 libraries:
Ubuntu/Debian
sudo apt-get install libwayland-dev libxkbcommon-dev \
  libx11-dev libxcursor-dev libxrandr-dev libxi-dev \
  libgl1-mesa-dev fontconfig