#proc-macro #codegen

macro oak-macros

Procedural macros for the Oak framework to simplify parser and AST definition

11 releases

Uses new Rust 2024

0.0.11 Mar 29, 2026
0.0.10 Mar 24, 2026
0.0.4 Feb 15, 2026
0.0.2 Jan 30, 2026

#812 in #codegen

Download history 20/week @ 2026-01-21 135/week @ 2026-01-28 125/week @ 2026-02-04 617/week @ 2026-02-11 231/week @ 2026-02-18 183/week @ 2026-02-25 148/week @ 2026-03-04 207/week @ 2026-03-11 197/week @ 2026-03-18 118/week @ 2026-03-25 160/week @ 2026-04-01 173/week @ 2026-04-08 226/week @ 2026-04-15 211/week @ 2026-04-22 157/week @ 2026-04-29 136/week @ 2026-05-06

775 downloads per month
Used in 162 crates (4 directly)

MPL-2.0 license

37KB
841 lines

🚀 oak-macros

Crates.io Documentation

Procedural Macros for Oak — Derive macros and helper attributes for Oak language implementations.

🎯 Why oak-macros?

Procedural macros reduce boilerplate in language implementations. oak-macros provides derive macros and helper attributes that simplify implementing Oak traits.

✨ Key Features

  • 🔧 Derive Macros — Automatically implement common Oak traits
  • 📝 Code Generation — Generate repetitive code patterns
  • 🎯 Type-Safe — Compile-time verification of generated code
  • ⚡ Zero Runtime Cost — Macros expand at compile time

🏗️ Architecture

Available Macros

Macro Purpose
#[derive(Language)] Auto-implement the Language trait
json! JSON literal construction

🔗 Ecosystem Integration

Used by language parser implementations, test code generation, and AST construction utilities.

📖 Documentation

For usage examples and API details, see the API documentation.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Dependencies

~100–455KB
~11K SLoC