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
1,203 downloads per month
Used in 139 crates
(3 directly)
37KB
834 lines
🚀 oak-macros
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