Crate xtask_lib

Crate xtask_lib 

Source
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

CommandDescription
fmtCheck (or apply) rustfmt formatting
clippyRun cargo clippy across the feature matrix
testRun cargo test across the feature matrix
build-koboCross-compile for Kobo (ARM, Linux only)
setup-nativeBuild MuPDF and the C wrapper for native dev
run-emulatorRun the Cadmus emulator (ensures prereqs are built)
install-importerInstall the Cadmus importer crate
docsBuild the full documentation portal
download-assetsDownload static asset dirs from the latest release
distAssemble the Kobo distribution directory
bundlePackage a KoboRoot.tgz ready for device installation
ciCI-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§

Command

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 Parser implementation.