A Rust library providing Language Integrated Query (LINQ) functionality via declarative macros and iterator extensions.
Linq-in-Rust is a Rust library that brings Language Integrated Query (LINQ) capabilities to Rust, inspired by LINQ in .NET. It enables expressive data querying and manipulation directly within Rust code through both method chaining and a dedicated macro syntax, extending Rust iterators with familiar operations.
Rust developers who are familiar with LINQ from .NET or other languages and want similar expressive querying capabilities in Rust, particularly those working with data transformations and collections.
Developers choose Linq-in-Rust for its intuitive SQL-like query syntax via the `linq!` macro and seamless integration with Rust's iterator model, offering type safety and zero-cost abstractions while providing an alternative to built-in iterator methods.
Language Integrated Query in Rust.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The `linq!` macro enables SQL-like queries (e.g., with `from`, `where`, `select`), making data manipulation more intuitive for developers familiar with LINQ, as shown in the quick start examples.
Extends Rust's standard `Iterator` trait with LINQ methods like `where_by` and `order_by`, allowing mixed use with built-in operations without breaking existing code.
Leverages Rust's compile-time type system to ensure query correctness, preventing runtime errors while maintaining zero-cost abstractions.
Supports nested (`from`) and zipped (`zfrom`) iterations for complex data relationships, enabling advanced transformations as demonstrated in the README.
The project warns that it's under development with potential API changes, posing risks for production use or long-term maintenance.
Key LINQ operations like `join`, `group_by`, and `average` are not implemented, limiting its utility for advanced query scenarios compared to .NET LINQ.
Relies on declarative macros, which might be less debuggable and flexible than procedural macros, and the syntax can feel foreign in Rust-centric codebases.