Module build_kobo

Module build_kobo 

Source
Expand description

cargo xtask build-kobo — cross-compile Cadmus for Kobo devices.

  1. Optionally downloads and builds all thirdparty libraries from source (--slow mode, required for CI).
  2. Builds the mupdf_wrapper C library for the Kobo ARM target.
  3. 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

ModeDescription
fast (default)Downloads pre-built .so files and MuPDF sources
slowBuilds all thirdparty libraries from source
slow + download-onlyDownloads all thirdparty sources without building
skipAssumes libs/ already exists; skips download entirely

Structs§

BuildKoboArgs
Arguments for cargo xtask build-kobo.

Constants§

BUILT_LIBRARY_COPIES 🔒
BUILT_LIBRARY_COPIES maps built .so paths to their destination names in libs/. The destination names here are the base names (e.g. libz.so); the actual SONAME is discovered at runtime via thirdparty::soname.
CROSS_ENV 🔒

Functions§

build_mupdf_wrapper_kobo 🔒
Builds the mupdf_wrapper C library for the Kobo ARM target.
build_thirdparty_fast 🔒
Downloads pre-built .so files and MuPDF sources (fast mode).
build_thirdparty_slow 🔒
Builds all thirdparty libraries from source (slow mode).
cargo_build_kobo 🔒
Runs cargo build --release for the ARM Kobo target.
copy_built_libs 🔒
Copies the .so files produced by the slow build into libs/.
create_symlinks 🔒
Creates the .so version symlinks expected by the Cadmus runtime.
download_release_libs 🔒
Downloads pre-built .so release 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.