#config-toml #arce-os #config #toml

macro ax-config-macros

Procedural macros for converting TOML format configurations to Rust constant definitions

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

Download history 182/week @ 2026-04-11 23/week @ 2026-04-18 54/week @ 2026-04-25 87/week @ 2026-05-02

346 downloads per month
Used in 34 crates (12 directly)

Apache-2.0

56KB
1K SLoC

ax-config-macros

Procedural macros for converting TOML format configurations to Rust constant definitions

Crates.io Docs.rs Rust License

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

  1. Fork the repository and create a branch
  2. Run local format and checks
  3. Run local tests relevant to this crate
  4. 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