Skip to main content

Module spec

Module spec 

Source
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§

CommandForm
One fully resolved command form.
KwargSpec
Specification for a keyword section and any nested sub-keywords it accepts.
LayoutOverrides
Per-command-form layout hints that override global crate::Config values.

Enums§

CommandSpec
NArgs
How many arguments a positional slot or keyword takes.