futures

The foundational Future, Stream, and Sink traits and combinators for zero-cost async Rust

Library
Cargo
v0.3.34
5,929 stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
90 /100 Excellent
Development Activity 84
Maintenance 96
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
84 /100 Excellent
Architecture 92
Code Quality 90
Innovation 85
Learning Curve 68

futures is the reference implementation of Rust’s asynchronous programming primitives — the Future, Stream, and Sink traits, plus a large library of combinator methods and macros (join!, select!, try_join!) for composing async and concurrent code without heap allocation or dynamic dispatch overhead. Maintained under the rust-lang GitHub organization, it predates and helped shape Rust’s native async/await syntax, and today acts as glue between the standard library’s minimal core::future::Future and the richer ecosystem of executors (Tokio, async-std, smol) and I/O runtimes that build on top of it.

The crate is a thin facade over a workspace of smaller crates (futures-core, futures-util, futures-channel, futures-io, futures-sink, futures-task, futures-executor) that can be depended on individually for no_std or minimal-dependency use cases. Most Rust developers reach for the umbrella futures crate, which re-exports everything through feature flags (std, async-await, executor, compat), making it one of the most widely depended-upon crates in the async Rust ecosystem.

What You Get

  • The Future, TryFuture, Stream, TryStream, and Sink trait definitions that underpin Rust’s async ecosystem
  • Extension traits (FutureExt, StreamExt, TryFutureExt, TryStreamExt, SinkExt, AsyncReadExt, AsyncWriteExt) with dozens of combinator methods for mapping, chaining, buffering, and error handling
  • Concurrency macros — join!, try_join!, select!, select_biased!, and stream_select! — for running multiple futures concurrently without spawning tasks
  • Channel primitives (futures::channel::mpsc, oneshot) and synchronization types (futures::lock::Mutex) built for async code
  • A pluggable executor module (futures::executor, including a work-stealing ThreadPool) and a compat layer for bridging futures 0.1 code into modern async/await
  • no_std-compatible sub-crates (futures-core, futures-task, futures-sink) for embedded and bare-metal targets

Common Use Cases

  • Composing multiple independent async operations concurrently with join!/try_join! instead of sequentially awaiting each one
  • Implementing custom Stream types (e.g. for polling a queue or paginated API) and consuming them with StreamExt combinators like .next(), .take(), .buffer_unordered()
  • Racing futures against each other (timeouts, first-response-wins) with select!/select_biased!
  • Building runtime-agnostic libraries that only depend on the Future/Stream/Sink traits so downstream users can plug in Tokio, async-std, or smol
  • Bridging channel-based producer/consumer patterns across async tasks with futures::channel::mpsc

Under The Hood

Architecture — futures is a workspace, not a single crate: the top-level futures package (futures/src/lib.rs, 241 lines) is a thin re-export facade over eight sibling crates (futures-core, futures-task, futures-channel, futures-executor, futures-io, futures-sink, futures-util, futures-macro) declared in the root Cargo.toml workspace. futures-core defines the bare Future/Stream/TryStream traits with zero dependencies; futures-util (333-line lib.rs, the largest crate) layers the combinator extension traits (future, stream, sink, task, io, lock, compat submodules) on top. This split lets consumers depend on just futures-core in no_std/embedded contexts while the umbrella futures crate wires everything together behind Cargo feature flags (std, alloc, async-await, executor, compat, io-compat) for typical application use.

Tech Stack — Pure Rust, edition 2018, MSRV 1.71 (pinned and CI-checked). The workspace has no non-Rust build dependencies; futures-macro provides the proc-macro backing for join!/select!. Feature-gated integration exists for bridging futures 0.1 (compat feature) and for no_std embedded targets via alloc-only builds.

Code Quality — 68 test files across the workspace (futures/tests, futures-channel/tests, futures-executor/tests) plus doctested examples embedded directly in lib.rs documentation. CI (.github/workflows/ci.yml) runs cargo test --workspace --all-features on Linux/macOS/Windows, a dedicated clippy job, and MSRV-pinned builds that explicitly exclude the higher-level crates to verify futures-core/futures-io/futures-sink build with a minimal toolchain. Workspace-level lints (missing_debug_implementations, unreachable_pub, rust_2018_idioms) are enforced as warnings across all member crates, reflecting the standards expected of a rust-lang-org crate depended on by a large share of the async ecosystem.

API Design — The umbrella crate keeps the public surface deliberately small and idiomatic: use futures::prelude::* plus the extension-trait pattern (FutureExt, StreamExt, SinkExt) means combinator methods are discoverable via IDE autocomplete directly on any Future/Stream/Sink value, mirroring Iterator’s ergonomics. Feature flags are used consistently to keep unused functionality (e.g. executor, compat) out of the default build, and the crate’s docs.rs configuration builds with all-features so the full API is always browsable.

Used by 107 apps in this directory

Rust
83%
AGPL 3.0

Vaultwarden

Password Manager · Security

68,240

Unofficial Bitwarden-compatible server in Rust — run the full Bitwarden ecosystem on a Raspberry Pi using every official client you already have, without the multi-container overhead.

View details
89
Repo Health
69
Technical
70
Dependency
Built with
Rust 83%
Updated 1 weeks ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,209

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
75
Repo Health
75
Technical
64
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 2 weeks ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,209

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
75
Repo Health
75
Technical
64
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 2 weeks ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,209

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
75
Repo Health
75
Technical
64
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 2 weeks ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,209

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
75
Repo Health
75
Technical
64
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 2 weeks ago
TypeScript
95%
Apache 2.0

Void

AI Code Assistants · Automation · Code Editors

28,786

Open-source AI code editor with direct LLM integration and data privacy

View details
45
Repo Health
84
Technical
68
Dependency
Built with
TypeScript 95%
Updated 4 months ago
Rust
97%
Apache 2.0

Volga

Data Engineering

161

A Rust-based real-time data processing engine for AI/ML feature computation, built on Apache DataFusion and Arrow — positioned as an alternative to Flink, Spark, Chronon, and OpenMLDB with unified streaming, batch, and request-time execution.

View details
67
Repo Health
67
Technical
72
Dependency
Built with
Rust 97%
Updated 6 days ago
Python
65%
Apache 2.0

WrenAI

AI Agents · Analytics · Data Engineering

17,763

Open-source GenBI engine that lets AI agents turn natural-language questions into governed SQL, charts, and shareable dashboards across 20+ data sources — no vendor lock-in, no black-box prompts.

View details
90
Repo Health
91
Technical
69
Dependency
Built with
Python 65%
Rust 32%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers