Is there a Rust crate like Zod, or is validation done differently here?
I’ve been doing a lot of backend work in TypeScript, and I got really used to using Zod for validation. I like how expressive it is — you define schemas, compose them, infer types, add refinements, transformations, etc. It feels powerful but still ergonomic.
Now I’m spending more time in Rust, and I’m trying to understand what the “idiomatic” approach to validation is.
I know about the validator crate, but it feels pretty basic compared to Zod. It works, but it doesn’t give me that same composability and expressiveness. It feels more like annotations than actual schema modeling.
So I’m wondering — is there a Zod-equivalent in Rust that people actually use? Or is the philosophy just different?
I’ve seen people suggest creating custom types like EmailAddress, UserId, etc., and implementing TryFrom<String> to validate at construction time.I get the idea, but it feels quite different from the “define one schema and reuse it” style I’m used to.
How do you usually structure this in real projects?