Expand description
Built-in and user-extensible command specification registry. Command-spec data model used by the formatter.
The built-in registry describes the argument structure of known commands so the formatter can recognize positional arguments, keywords, flags, and command-specific layout hints.
§Entry point
Use crate::CommandRegistry to obtain a resolved registry —
either CommandRegistry::builtins
for the lazily-initialised built-in singleton, or
CommandRegistry::from_builtins_and_overrides
to merge a user override file on top of the built-ins.
§Where the built-in spec lives
The full CMake standard-library spec is compiled into the binary
from src/spec/builtins.yaml. That file also carries a
[metadata] block recording the upstream CMake version it was
last audited against; the same version is reported by
CommandRegistry::audited_cmake_version.
Modules§
- registry
- Built-in and override-backed command registry.
Structs§
- Command
Form - One fully resolved command form.
- Kwarg
Spec - Specification for a keyword section and any nested sub-keywords it accepts.
- Layout
Overrides - Per-command-form layout hints that override global
crate::Configvalues.
Enums§
- Command
Spec - NArgs
- How many arguments a positional slot or keyword takes.