4 releases
Uses new Rust 2024
| new 0.4.8 | May 9, 2026 |
|---|---|
| 0.4.7 | May 8, 2026 |
| 0.4.2 | Apr 15, 2026 |
| 0.4.1 | Apr 14, 2026 |
#1136 in Procedural macros
346 downloads per month
Used in 34 crates
(12 directly)
56KB
1K
SLoC
ax-config-macros
Procedural macros for converting TOML format configurations to Rust constant definitions
English | 中文
Introduction
ax-config-macros provides Procedural macros for converting TOML format configurations to Rust constant definitions. It is maintained as part of the TGOSKits component set and is intended for Rust projects that integrate with ArceOS, AxVisor, or related low-level systems software.
ax-config-macros was derived from https://github.com/arceos-org/axconfig-gen
Quick Start
Installation
Add this crate to your Cargo.toml:
[dependencies]
ax-config-macros = "0.4.1"
Run Check and Test
# Enter the crate directory
cd components/axconfig-gen/axconfig-macros
# Format code
cargo fmt --all
# Run clippy
cargo clippy --all-targets --all-features
# Run tests
cargo test --all-features
# Build documentation
cargo doc --no-deps
Integration
Example
use ax_config_macros as _;
fn main() {
// Integrate `ax-config-macros` into your project here.
}
Documentation
Generate and view API documentation:
cargo doc --no-deps --open
Online documentation: docs.rs/ax-config-macros
Contributing
- Fork the repository and create a branch
- Run local format and checks
- Run local tests relevant to this crate
- Submit a PR and ensure CI passes
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
Dependencies
~1.8–2.6MB
~48K SLoC