Expand description
aube’s command layer as a library.
The aube / aubr / aubx binaries are thin wrappers over
cli_main; everything else lives here so the command layer can be
embedded by other tools — e.g. constructing
commands::install::InstallOptions and calling
commands::install::run in-process instead of shelling out to the
CLI. The public surface is deliberately small: commands (command
implementations and their args/options structs), cli_args (the
shared clap argument groups flattened into command args), and
cli_main. Everything else is crate-private plumbing shared by the
commands.
The library makes no global-allocator choice — the mimalloc opt-in
lives in src/main.rs so embedders keep control of their own
allocator.
Modules§
Functions§
- cli_
main - Library entry point. An embedder calls this with its own
&'static Embedder(and optional setting defaults); theaubebinary passes&aube_util::AUBEand no defaults, reproducing standalone behavior. This is the whole embedding API: register-then-run in one call, so a host never has to separately wire identity and defaults. - cli_
main_ with_ defaults cli_mainplus embedder-supplied setting defaults. Thedefaultsare(canonical_setting_name, raw_value)pairs registered at the lowest precedence tier — below every user- and project-level source — for the genuinely user-overridable knobs an embedder wants to re-default. (Embedder-fixed behavior lives onaube_util::Embedderitself, not here.) Standalone aube passes an empty vec, so per-setting built-in defaults apply unchanged.- command
- The clap
Commandfor the CLI, with its version reset to the plain package version (stripping the-DEBUGruntime suffix) so any derived artifact stays byte-stable across profiles. This exposes the command surface itself — not aube’s ownusageKDL subcommand, which is aube-specific tooling that lives in the binary (src/main.rs), not in the embeddable command layer. A downstream embedder builds its own top-level usage/completions from this.