Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. Linq-in-Rust

Linq-in-Rust

Apache-2.0Rust

A Rust library providing Language Integrated Query (LINQ) functionality via declarative macros and iterator extensions.

GitHubGitHub
140 stars8 forks0 contributors

What is Linq-in-Rust?

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.

Target Audience

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.

Value Proposition

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.

Overview

Language Integrated Query in Rust.

Use Cases

Best For

  • Writing expressive, SQL-like queries on Rust collections using a macro-based syntax.
  • Extending Rust iterators with LINQ-style methods like `where_by`, `select`, and `order_by` for method chaining.
  • Performing complex data transformations involving nested or zipped iterations with `from` and `zfrom` clauses.
  • Leveraging type-safe query operations that are checked at compile time within Rust's ecosystem.
  • Migrating or adapting .NET LINQ code patterns to Rust while maintaining similar expressiveness.
  • Enhancing readability in data manipulation code by using declarative query expressions instead of imperative loops.

Not Ideal For

  • Projects prioritizing minimal dependencies and strict adherence to Rust's standard library idioms
  • Performance-critical applications where macro expansion overhead or abstraction layers are unacceptable
  • Teams needing complete LINQ feature parity, such as joins and group operations, for complex data queries
  • Developers who avoid macros due to debugging challenges or readability concerns in their codebase

Pros & Cons

Pros

Expressive Macro Syntax

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.

Seamless Iterator Integration

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.

Type-Safe Queries

Leverages Rust's compile-time type system to ensure query correctness, preventing runtime errors while maintaining zero-cost abstractions.

Flexible Iteration Models

Supports nested (`from`) and zipped (`zfrom`) iterations for complex data relationships, enabling advanced transformations as demonstrated in the README.

Cons

Unstable Development State

The project warns that it's under development with potential API changes, posing risks for production use or long-term maintenance.

Incomplete Feature Set

Key LINQ operations like `join`, `group_by`, and `average` are not implemented, limiting its utility for advanced query scenarios compared to .NET LINQ.

Macro Dependency Limitations

Relies on declarative macros, which might be less debuggable and flexible than procedural macros, and the syntax can feel foreign in Rust-centric codebases.

Frequently Asked Questions

Quick Stats

Stars140
Forks8
Contributors0
Open Issues3
Last commit2 years ago
CreatedSince 2019

Tags

#functional-programming#query-language#linq#iterator#rust#no-std#data-manipulation

Built With

C
Cargo
R
Rust

Included in

Rust56.6k
Auto-fetched 17 hours ago

Related Projects

bonbon

Next-gen compile-time-checked builder generator, named function's arguments, and more!

Stars2,103
Forks43
Last commit27 days ago
cutecute

Macro for Python-esque comprehensions in Rust

Stars346
Forks8
Last commit7 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub