2 unstable releases
| new 0.1.0 | Mar 15, 2026 |
|---|---|
| 0.0.0-alpha.3 | Mar 15, 2026 |
#1164 in Procedural macros
5KB
Read [package.metadata.<tool>] config from Cargo.toml for derive macros.
Proc macros run at compile time and can read CARGO_MANIFEST_DIR to find
the project's Cargo.toml. This crate provides a generic reader that:
- Reads
[package.metadata.<tool>]from the compiling crate'sCargo.toml - Falls back to
[workspace.metadata.<tool>]in the workspace root - Caches the result for the compilation session
use derive_project_config::read_metadata;
let table = read_metadata("flowjs-rs");
if let Some(val) = table.and_then(|t| t.get("opaque_newtypes")) {
// use val
}
Dependencies
~445–750KB
~17K SLoC