fader_master/docs/build.md

2.3 KiB

Build prerequisites

fader_master targets Linux and uses Rust 2024. Rust 1.88.0 is the selected minimum supported Rust version (MSRV) and the repository-pinned development toolchain. rustup reads rust-toolchain.toml and installs the required rustfmt, Clippy, and LLVM tools components.

The default build includes the PulseAudio protocol adapter and links to libpulse. On a Debian-family Linux system, install:

sudo apt-get install build-essential pkg-config libasound2-dev libpulse-dev libudev-dev
rustup toolchain install 1.88.0 \
    --profile minimal \
    --component rustfmt \
    --component clippy \
    --component llvm-tools-preview

On Arch Linux with PipeWire, install the client library, build tools, and the PulseAudio-compatible PipeWire service:

sudo pacman -S --needed base-devel pkgconf alsa-lib libpulse systemd-libs pipewire-audio pipewire-pulse wireplumber
pactl info

The Server Name reported by the last command should contain PulseAudio (on PipeWire ...). Arch packages the headers with libpulse, rather than in a separate development package. The application communicates with PipeWire through pipewire-pulse; it does not require the standalone PulseAudio server.

The Pulse adapter works with PulseAudio and PipeWire's pipewire-pulse compatibility service. MIDI input uses ALSA's sequencer API through midir, and Linux identity enrichment uses libudev. PipeWire does not replace the alsa-lib build dependency. A build that deliberately excludes native audio and MIDI dependencies remains available:

cargo build --workspace --no-default-features --locked

Future native PipeWire and ALSA mixer adapters will add their own feature-gated development packages. The MIDI crate can also be checked without its native transport and identity discovery while retaining byte decoding and routing:

cargo check -p midi --no-default-features --locked

From a fresh checkout, use the tracked lockfile for reproducible resolution:

cargo build --workspace --locked
cargo test --workspace --all-targets --all-features --locked

Verify the MSRV explicitly without allowing rust-toolchain.toml to select a newer installed toolchain:

cargo +1.88.0 check --workspace --all-targets --all-features --locked
cargo +1.88.0 test --workspace --all-targets --all-features --locked