Files
photocraft/book/src/getting-started/building.md
T
Erica FrancoandBrandon Thomas 31def413cc fix(docs): Linux build prerequisites only name Debian packages (#2437)
The prerequisites listed `libxkbcommon-dev ... libgtk-3-dev`, which exist only
on Debian and Ubuntu: on Arch none of those names resolve and `pacman -S` fails
on the whole line, and on Fedora and openSUSE they all need `-devel`. Nothing
else in the repository gives the equivalents.

The app already speaks four distros at runtime: linux_libs.rs carries a
{soname, debian, fedora, arch, suse} table, reads ID and ID_LIKE from
/etc/os-release and prints the matching apt, dnf, pacman or zypper command when
a runtime library is missing. This brings the build instructions up to that.

Also adds the prerequisites to the book's Building page, which said only to
install the Rust toolchain.

Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-10 14:35:12 -04:00

1.2 KiB

Building

PhotoCraft uses the Rust workspace at the repository root. Install the stable Rust toolchain, clone the repository, and run commands from that root.

On Linux, install the windowing, GL and GTK development packages first. The development guide's Prerequisites list them for Debian/Ubuntu, Fedora, Arch and openSUSE.

cargo build --workspace
cargo run --release -p photocraft -- image.psd
cargo run -p photocraft-cli -- --help

The standard repository gates are:

cargo fmt --all -- --check
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo xtask layers
cargo xtask wasm

cargo xtask wasm requires the wasm32-unknown-unknown target. UI work should also be checked using the offscreen snapshot example described in the development guide.

Build the documentation

Install mdBook, then build from the repository root:

cargo install mdbook --locked
mdbook build book

The generated site is written to book/output/ and is not source documentation.