Skip to main content

utz_build_cli/
lib.rs

1// docs.rs-only override of the sibling link; see utz/src/lib.rs.
2#![cfg_attr(
3    on_docsrs,
4    doc = "[`utz_build::Config`]: https://docs.rs/utz_build/latest/utz_build/config/struct.Config.html"
5)]
6#![cfg_attr(on_docsrs, doc = "")]
7//! The μTZ asset-generation CLI, shipped as the `utz_build_cli` binary.
8//!
9//! This crate is the command-line counterpart of a `build.rs` using
10//! [`utz_build::Config`]: it writes `.utz` assets for flash partitions,
11//! OTA images, and experiments, where a build script is the wrong shape.
12//!
13//! ```text
14//! utz_build_cli gen [ds] [epsilon_m] [--qbits 24] [--grid-deg 2]
15//!     [--codec none|gzip|zstd|brotli|xz] [--algorithm rdp|vw|ii|none]
16//!     [--geom varint-arcs|fixed-width-arcs|full-rings|coarse]
17//!     [--w-min <mult>] [-o out.utz]
18//! utz_build_cli gen-preset [tiny|tiny-static|compact|balanced|accurate]
19//! ```
20//!
21//! [`cmd::generate`] is `gen`: it exposes every knob of
22//! [`utz_build::Config`], one flag each. [`cmd::gen_preset`] drives the
23//! canonical `utz_build::presets` recipe table (every preset when the
24//! name is omitted), so preset assets regenerate from a single source
25//! of truth. The repo-internal measurement and
26//! viewer commands live in the (unpublished) `utz_dev_cli` crate.
27//!
28//! [`utz_build::Config`]: ../utz_build/config/struct.Config.html
29//! [`cmd::generate`]: ../utz_build_cli/cmd/generate/index.html
30//! [`cmd::gen_preset`]: ../utz_build_cli/cmd/gen_preset/index.html
31
32pub mod cmd;