#proc-macro #codegen

macro oak-macros

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

6 releases

Uses new Rust 2024

new 0.0.6 Mar 4, 2026
0.0.5 Mar 3, 2026
0.0.4 Feb 15, 2026
0.0.2 Jan 30, 2026

#553 in #codegen

Download history 20/week @ 2026-01-20 134/week @ 2026-01-27 126/week @ 2026-02-03 567/week @ 2026-02-10 215/week @ 2026-02-17 259/week @ 2026-02-24

1,203 downloads per month
Used in 139 crates (3 directly)

MPL-2.0 license

37KB
834 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

~115–490KB
~12K SLoC