Expand description
cmakefmt is a fast, configurable CMake formatter and parser.
The crate exposes:
- configuration types under
config - parser entry points under
parser - formatting entry points under
formatter - command-spec registry types under
spec
Most embedders will start with format_source or
format_source_with_debug.
Re-exports§
pub use config::convert_legacy_config_files;pub use config::default_config_template;pub use config::default_config_template_for;pub use config::render_effective_config;pub use config::CaseStyle;pub use config::CommandConfig;pub use config::Config;pub use config::DangleAlign;pub use config::DumpConfigFormat;pub use config::PerCommandConfig;pub use error::Error;pub use error::Result;pub use formatter::format_source;pub use formatter::format_source_with_debug;pub use formatter::format_source_with_registry;pub use formatter::format_source_with_registry_debug;
Modules§
- config
- Runtime formatter configuration and config-file loading. Runtime formatter configuration.
- error
- Shared error types used across parsing, config loading, and formatting.
- files
- Recursive CMake file discovery helpers used by the CLI and benchmarks.
- formatter
- Source-to-source formatting pipeline. Top-level formatter entry points.
- parser
- CMake parser and AST definitions. Parser entry points for CMake source text.
- spec
- Built-in and user-extensible command specification registry. Command-spec data model used by the formatter.