For a data validation library for Rust, the first results are keats/validator (This library provides a declarative, macro-based framework for enforcing data integrity and business rules on Rust structs, perfectly matching the requirements for robust, type-safe input validation), dtolnay/thiserror (This is a library for defining and managing custom error types rather than a tool for validating data structures or user input against a schema) and dtolnay/syn (This is a toolkit for parsing Rust source code and building procedural macros, which serves as a foundational building block for creating validation tools rather than being a data validation library itself). Compare the match explanations and check the project documentation against your requirements.
We curate open-source GitHub repositories matching “best rust validation libraries”. Results are ranked by relevance to your query — pick filters below to narrow, or refine with AI.
This library is a declarative validation framework for Rust that enforces data integrity and business rules on structured data models. It utilizes procedural macros to transform attribute-based annotations into executable validation logic, ensuring that data structures adhere to defined constraints before processing. The framework distinguishes itself by performing validation at compile time, which eliminates runtime overhead and provides strict type checking for all rules. It supports recursive traversal of nested data structures and collections, ensuring that every level of a hierarchy is v
This library provides a declarative, macro-based framework for enforcing data integrity and business rules on Rust structs, perfectly matching the requirements for robust, type-safe input validation.
thiserror is a Rust error handling library and procedural macro designed to define custom error types. It functions as a trait implementation automator that generates the necessary code for standard library error traits at compile time. The library focuses on eliminating boilerplate by using derive macros to automatically implement display and source methods. It allows for the creation of custom error structs and enums that can map low-level errors to high-level variants while preserving the original cause and backtrace information. Its capabilities cover custom error formatting through temp
This is a library for defining and managing custom error types rather than a tool for validating data structures or user input against a schema.
syn is a Rust syntax tree parser and token stream converter. It serves as a toolkit for procedural macro development, providing a framework to parse Rust source code into structured syntax trees for analysis and transformation. The project enables the manipulation of Rust abstract syntax trees through specialized visitor and folder patterns for traversing and mutating nodes. It provides a bidirectional mapping that allows developers to convert token streams into structured trees and print those trees back into tokens for code generation. The library covers a broad range of syntax analysis ca
This is a toolkit for parsing Rust source code and building procedural macros, which serves as a foundational building block for creating validation tools rather than being a data validation library itself.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| keats/validator | 2.5K | Rust | MIT | |
| dtolnay/thiserror | 5.5K | Rust | Apache-2.0 | |
| dtolnay/syn |
| 3.3K |
| Rust |
| apache-2.0 |