Expand description
§xtask — Cadmus build automation
Centralises every build, test, lint, documentation, and release task for the Cadmus project as typed, testable Rust code that behaves identically in a local devenv shell and in GitHub Actions CI.
§Usage
cargo xtask <COMMAND> [OPTIONS]The xtask alias is configured in .cargo/config.toml so that
cargo xtask works from any directory inside the workspace.
§Commands
| Command | Description |
|---|---|
fmt | Check (or apply) rustfmt formatting |
clippy | Run cargo clippy across the feature matrix |
test | Run cargo test across the feature matrix |
build-kobo | Cross-compile for Kobo (ARM, Linux only) |
setup-native | Build MuPDF and the C wrapper for native dev |
run-emulator | Run the Cadmus emulator (ensures prereqs are built) |
install-importer | Install the Cadmus importer crate |
docs | Build the full documentation portal |
download-assets | Download static asset dirs from the latest release |
dist | Assemble the Kobo distribution directory |
bundle | Package a KoboRoot.tgz ready for device installation |
ci | CI-specific setup tasks (e.g. install-doc-tools) |
§Design
Each command lives in its own module under tasks. The tasks::util::cmd
helper wraps std::process::Command with consistent error reporting so
every task fails fast with a clear message. The tasks::util::http module
provides pure-Rust download and archive helpers replacing curl, wget,
tar, and sha256sum subprocess calls.
Re-exports§
pub use tasks::build_kobo::BuildKoboArgs;pub use tasks::bundle::BundleArgs;pub use tasks::ci::CiArgs;pub use tasks::clippy::ClippyArgs;pub use tasks::dist::DistArgs;pub use tasks::docs::DocsArgs;pub use tasks::fmt::FmtArgs;pub use tasks::install_importer::InstallImporterArgs;pub use tasks::run_emulator::RunEmulatorArgs;pub use tasks::setup_native::SetupNativeArgs;pub use tasks::test::TestArgs;
Modules§
- tasks
- Task implementations for
cargo xtask.
Structs§
- Cli
- Cadmus build automation.
Enums§
Traits§
- Parser
- Parse command-line arguments into
Self.
Functions§
- run
- Run the xtask CLI with the given arguments.
Type Aliases§
- Result
Result<T, Error>
Derive Macros§
- Parser
- Generates the
Parserimplementation.