Expand description
cargo xtask build-kobo — cross-compile Cadmus for Kobo devices.
- Optionally downloads and builds all thirdparty libraries from source
(
--slowmode, required for CI). - Builds the
mupdf_wrapperC library for the Kobo ARM target. - Runs
cargo build --release --target arm-unknown-linux-gnueabihf.
§Platform requirement
Cross-compilation requires the Linaro ARM toolchain
(arm-linux-gnueabihf-gcc and friends) which is only available on Linux.
The task exits with a clear error on macOS.
§Build modes
| Mode | Description |
|---|---|
| fast (default) | Downloads pre-built .so files and MuPDF sources |
| slow | Builds all thirdparty libraries from source |
| slow + download-only | Downloads all thirdparty sources without building |
| skip | Assumes libs/ already exists; skips download entirely |
Structs§
- Build
Kobo Args - Arguments for
cargo xtask build-kobo.
Constants§
- BUILT_
LIBRARY_ 🔒COPIES - BUILT_LIBRARY_COPIES maps built
.sopaths to their destination names inlibs/. The destination names here are the base names (e.g.libz.so); the actual SONAME is discovered at runtime viathirdparty::soname. - CROSS_
ENV 🔒
Functions§
- build_
mupdf_ 🔒wrapper_ kobo - Builds the
mupdf_wrapperC library for the Kobo ARM target. - build_
thirdparty_ 🔒fast - Downloads pre-built
.sofiles and MuPDF sources (fast mode). - build_
thirdparty_ 🔒slow - Builds all thirdparty libraries from source (slow mode).
- cargo_
build_ 🔒kobo - Runs
cargo build --releasefor the ARM Kobo target. - copy_
built_ 🔒libs - Copies the
.sofiles produced by the slow build intolibs/. - create_
symlinks 🔒 - Creates the
.soversion symlinks expected by the Cadmus runtime. - download_
release_ 🔒libs - Downloads pre-built
.sorelease assets from the cadmus GitHub release with checksum verification. - ensure_
linaro_ 🔒toolchain - Verifies that the Linaro ARM cross-compiler is available on
PATH. - run
- Cross-compiles Cadmus for Kobo ARM devices.