Module dist

Module dist 

Source
Expand description

cargo xtask dist — assemble the Kobo distribution directory.

Copies the compiled Cadmus binary, shared libraries, scripts, fonts, icons, and other assets into a dist/ directory that mirrors the layout expected on the Kobo device.

§Prerequisites

  • cargo xtask build-kobo must have been run first.
  • libs/ must contain the ARM shared libraries.
  • bin/, resources/, and hyphenation-patterns/ must exist.

§Output layout

dist/
├── cadmus                  (ARM binary)
├── libs/                   (versioned .so files)
├── fonts/
├── icons/
├── css/
├── scripts/
├── keyboard-layouts/
├── hyphenation-patterns/
├── bin/
├── resources/
├── Settings-sample.toml
├── LICENSE
└── *.sh                    (contrib scripts)

Structs§

DistArgs
Arguments for cargo xtask dist.

Functions§

clean_user_files 🔒
Removes user-specific files that should not be distributed.
copy_assets 🔒
Copies static assets (fonts, icons, scripts, etc.) into dist/.
copy_binary 🔒
Copies the compiled ARM binary into dist/.
copy_libraries 🔒
Copies ARM shared libraries from libs/ into dist/libs/ with versioned names expected by the Kobo runtime linker.
remove_matching 🔒
Removes files in dir whose names match the glob pattern.
run
Assembles the Kobo distribution directory.
strip_and_patch 🔒
Strips debug symbols and removes RPATH from the binary and all libraries.