2 stable releases

Uses new Rust 2024

new 1.0.1 Feb 1, 2026
1.0.0 Jan 31, 2026

#979 in Procedural macros


Used in easy-macros

Apache-2.0

86KB
1.5K SLoC

Easy Macros

Crates.io Documentation License

Use the parent crate instead.

What is this?

Crates.io

#[add_code] injects statements at the start and/or end of a function or impl method body. Its main use case is keeping docify-generated examples clean while still adding setup/teardown or assertions for tests.

Dependencies

~17–24MB
~529K SLoC