Derive macros forholy
A Rust proc-macro crate with derive macros for getters, setters, observers, fuzz constructors, and input sanitization to end struct boilerplate.
Derive away the boilerplate
Ships derive macros for everyday struct chores as a path or crates.io dependency, keeping each consumer free of hand-rolled code and centralizing policy — new sanitize rules, observer hooks — in one crate.
- Sanitize — trim, lowercase, escape_html, slug, truncate(N), clamp(min, max).
- Fuzz — random constructors for tests.
Questions
Frequently asked
What is the holy crate?
holy is a Rust proc-macro library shipping derive macros for everyday struct chores — getters, setters, observers, fuzz constructors, and input sanitization — so consumers avoid hand-rolled boilerplate.
Which derive macros does holy provide?
Getters, Setters, Observer (change events), Fuzz (random constructors for tests), and Sanitize (.sanitize() plus per-field methods driven by
What sanitization rules does the Sanitize derive support?
String rules like trim, lowercase, uppercase, alphanumeric, escape_html, nul_strip, control_strip, slug, and truncate(N), plus clamp(min, max) for numeric fields; rules run in the order written and Option String fields run only when Some.
