Building from Source
Follow this guide to set up your build environment and compile BarePDF from source.
Prerequisites
Windows
- Rust Toolchain: Install stable Rust (Edition 2021+) via rustup.rs.
rustup update stable - C++ Build Tools: Visual Studio 2022 C++ build tools or Windows SDK (required for native Win32 linking).
- Inno Setup (Optional, for installer generation):
choco install innosetup --no-progress -y
Linux (Pardus 23/25, Debian, Ubuntu)
- Rust Toolchain: Install stable Rust via rustup.rs.
rustup update stable - System Libraries: Install required font, input, and graphics development packages:
sudo apt update sudo apt install -y libfontconfig1-dev libxkbcommon-dev libgl1-mesa-dev libgbm-dev - Packaging Tools (Optional, for
.debandAppImagegeneration):cargo install cargo-deb --locked
Development Build
To compile and launch the debug build:
cargo run --package barepdf
To run checks across all workspace crates:
cargo check --workspace --all-targets --all-features
Release Build
To build the optimized production binary with LTO, symbol stripping, and opt-level = 3:
cargo build --workspace --release --locked
The compiled executable will be output to:
target/release/BarePDF.exe
Running Full Packaging Pipeline
To execute the full release verification pipeline locally:
powershell -File packaging/windows/scripts/validate-version.ps1
powershell -File packaging/windows/scripts/stage-release.ps1
powershell -File packaging/windows/scripts/build-portable.ps1
powershell -File packaging/windows/scripts/build-installer.ps1
powershell -File packaging/windows/scripts/validate-installer.ps1
powershell -File packaging/windows/scripts/generate-checksums.ps1