cirious_codex_derive 0.1.0

Centralized Procedural Macros for the Cirious Codex Ecosystem
Documentation

📜 Cirious Codex Logger

Structured Logging & Event Tracing for the Cirious Ecosystem

Robust, extensible, and performance-oriented observability primitives designed for modern Rust applications.

CI Crates.io Docs.rs Language License


📖 Overview

Cirious Codex Derive is the foundational procedural macro engine for the Cirious Codex ecosystem.

Instead of relying on scattered, heavy, or ambiguous third-party macro crates, this library centralizes all #[derive(...)] and attribute macros used across the Cirious workspace. It ensures that components like command-line interfaces, configuration structs, and telemetry events are generated with strict compile-time validation, consistent behavior, and actionable error reporting.

✨ Key Ecosystem Integrations

  • Codex CLI: Generates strict, predictable argument parsers (#[derive(CodexParser)]) that enforce clear execution flows and eliminate ambiguous terminal inputs.
  • Codex Config: Simplifies the mapping of environment variables and structured files to strongly-typed configurations.
  • Codex Logger: Injects zero-cost telemetry and logging metadata into structs and functions.

🚀 Quick Start

Add the crate to your project:

[dependencies]
cirious_codex_derive = "0.1.0"

Build and Run CLI Applications:

use cirious_codex_derive::{CodexCommand, CodexParser};

#[derive(CodexParser, CodexCommand, Debug)]
pub struct AuthConfig {
  pub global: GlobalArgs,
  
  #[codex(short, long, default = "3000")]
  pub port: u16,

  #[codex(short, long)]
  pub config_path: String,
}

fn main() {
  let config = AuthConfig::parse_cli();
  println!("{:#?}", config);
}

🚧 Development Roadmap

✅ v0.1.0 — Foundation & CLI Core

  • Setup proc-macro workspace architecture (syn, quote, proc-macro2).
  • Implement foundational traits and attribute parsing logic.
  • Develop #[derive(CodexParser)] and #[derive(CodexCommand)] to replace third-party CLI parsing.
  • Strict terminal argument validation and custom compilation errors.

🔭 v0.2.0 — Subcommands & Globals

  • Implement #[derive(CodexSubcommand)] for Enum routing.
  • Automatic injection and flattening of GlobalArgs (--config, --verbose).
  • Implementation of custom error formatting tailored for the terminal.

📜 License

Licensed under either of the following, at your option:

  • MIT License
  • Apache License 2.0

Minimalist by design. Consistent in execution.

Engineered by Cirious Studio