18 releases
| 0.9.0 | Apr 16, 2026 |
|---|---|
| 0.8.1 | Jul 12, 2025 |
| 0.8.0 | Apr 7, 2025 |
| 0.7.1 | Sep 5, 2024 |
| 0.1.0 | Jul 5, 2020 |
#1078 in Procedural macros
13,829 downloads per month
Used in 8 crates
(via extendr-api)
82KB
1.5K
SLoC
extendr-macros
A procedural macro crate for extendr-api.
This crate implements macros such as the #[extendr] function
markup and the extendr_module! macro. See extendr-api for
more details.
For Developers
This crate uses trybuild for testing procedural macros.
Trybuild compiles test cases in tests/cases/ and tests/extendr_impl/ and verifies that the compiler produces expected error messages for invalid code.
Running Tests
To run the trybuild tests:
cargo test --package extendr-macros --test trybuild
Updating Expected Outputs
When you intentionally change error messages or add new test cases, you need to update the expected output files (.stderr files). Use the TRYBUILD=overwrite environment variable to automatically update them:
TRYBUILD=overwrite cargo test --package extendr-macros --test trybuild
This will regenerate the .stderr files in the tests/cases/ directory to match the current compiler output.
Dependencies
~110–465KB
~11K SLoC