HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
tokio-rs
tokio
Rust2016–2026
tokio-rs / tokio

tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

43Distinct people
49Mentions
1Explicit recommenders
33.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

Tokio author here. Generally speaking, I recommend strongly against using FuturesUnordered unless you know all the pitfalls. We are working on an alternative utility that…

carllerche used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 5:04:15 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year49 dated mentions

Observed mentions: 2016-08-05 18:35:46 UTC to 2026-09-14 22:05:26 UTC.

02468102016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 10 mentions; 3 submissions, 7 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC505
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC303
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC404
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC1037
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC505
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC303
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC413
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC707
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Tokio A runtime for writing reliable, asynchronous, and slim applications with the Rust programming language. It is: Fast: Tokio's zero-cost abstractions give you bare-metal performance. Reliable: Tokio leverages Rust's ownership, type system, and concurrency model to reduce bugs and ensure thread safety. Scalable: Tokio has a minimal footprint, and handles backpressure and cancellation naturally. Website | Guides | API Docs | Chat Overview Tokio is an event-driven, non-blocking I/O platform for writing asynchronous applications with the Rust programming language. At a high level, it provides a few major components: A multithreaded, work-stealing based task scheduler. A reactor backed by the operating system's event queue (epoll, kqueue, IOCP, etc.). Asynchronous TCP and UDP sockets. These components provide the runtime components necessary for building an asynchronous application. Example A basic TCP echo server with Tokio. Make sure you enable the full features of the tokio crate on Cargo.toml: [dependencies] tokio = { version = "1.54.1", features = ["full"] } Then, on your main.rs: use tokio::net::TcpListener; use tokio::io::{AsyncReadExt, AsyncWriteExt}; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let listener = TcpListener::bind("127.0.0.1:8080").await?; loop { let (mut socket, _) = listener.accept().await?; tokio::spawn(async move { let mut buf = [0; 1024]; // In a loop, read data from the socket and write the data back. loop { let n = match socket.read(&mut buf).await { // socket closed Ok(0) => return, Ok(n) => n, Err(e) => { eprintln!("failed to read from socket; err = {:?}", e); return; } }; // Write the data back if let Err(e) = socket.write_all(&buf[0..n]).await { eprintln!("failed to write to socket; err = {:?}", e); return; } } }); } } More examples can be found here. For a larger "real world" example, see the mini-redis repository. To see a list of the available feature flags that can be enabled, check our docs. Getting Help First, see if the answer to your question can be found in the Guides or the API documentation. If the answer is not there, there is an active community in the Tokio Discord server. We would be happy to try to answer your question. You can also ask your question on the discussions page. Contributing 🎈 Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the Tokio project. Related Projects In addition to the crates in this repository, the Tokio project also maintains several other libraries, including: toasty: An async ORM for Rust supporting both SQL and NoSQL databases. axum: A web application framework that focuses on ergonomics and modularity. hyper: A fast and correct HTTP/1.1 and HTTP/2 implementation for Rust. tonic: A gRPC over HTTP/2 implementation focused on high performance, interoperability, and flexibility. warp: A super-easy, composable, web server framework for warp speeds. tower: A library of modular and reusable components for building robust networking clients and servers. tracing (formerly tokio-trace): A framework for application-level tracing and async-aware diagnostics. mio: A low-level, cross-platform abstraction over OS I/O APIs that powers tokio. bytes: Utilities for working with bytes, including efficient byte buffers. loom: A testing tool for concurrent Rust code. Changelog The Tokio repository contains multiple crates. Each crate has its own changelog. tokio - view changelog tokio-util - view changelog tokio-stream - view changelog tokio-macros - view changelog tokio-test - view changelog Supported Rust Versions Tokio will keep a rolling MSRV (minimum supported rust version) policy of at least 6 months. When increasing the MSRV, the new Rust version must have been released at least six months ago. The current MSRV is 1.85. Note that the MSRV is not increased automatically, and only as part of a minor release. The MSRV history for past minor releases can be found below: 1.54 to now - Rust 1.85 1.48 to 1.53 - Rust 1.71 1.39 to 1.47 - Rust 1.70 1.30 to 1.38 - Rust 1.63 1.27 to 1.29 - Rust 1.56 1.17 to 1.26 - Rust 1.49 1.15 to 1.16 - Rust 1.46 1.0 to 1.14 - Rust 1.45 Note that although we try to avoid the situation where a dependency transitively increases the MSRV of Tokio, we do not guarantee that this does not happen. However, every minor release will have some set of versions of dependencies that works with the MSRV of that minor release. Release schedule Tokio doesn't follow a fixed release schedule, but we typically make one minor release each month. We make patch releases for bugfixes as necessary. Bug patching policy For the purposes of making patch releases with bugfixes, we have designated certain minor releases as LTS (long term support) releases. Whenever a bug warrants a patch release with a fix for the bug, it will be backported and released as a new patch release for each LTS minor version. Our current LTS releases are: 1.51.x - LTS release until March 2027. (MSRV 1.71) 1.53.x - LTS release until September 2027. (MSRV 1.71) Each LTS release will continue to receive backported fixes for at least a year. If you wish to use a fixed minor release in your project, we recommend that you use an LTS release. To use a fixed minor version, you can specify the version with a tilde. For example, to specify that you wish to use the newest 1.51.x patch release, you can use the following dependency specification: tokio = { version = "~1.51", features = [...] } Previous LTS releases 1.8.x - LTS release until February 2022. 1.14.x
Read the full README on GitHub

What Hacker News says

5 sources
Well, the blog examples are quite trivial. Take a look at the standard hashmap implementation (https://doc.rust-lang.org/src/std/collections/hash/map.rs.ht...). Notice the lifetime annotations everywhere. This is a relatively basic data structure, but it has a ton of visual noise due to the constraints of the lifetime and borrow model, and programmers must know, understand and be able to reason about these constraints when using this data structure. Now imagine a case where you need to operate on values with two (or more) different lifetimes (by definition, all must live at least as long as the one with smallest lifetime, but in practice they all can and will have different lifetimes). Now you have `'a` and `'b` (and perhaps more) everywhere *and* developers must now reason about that. (random example pulled from a popular networking crat
Read the rest
e: https://github.com/tokio-rs/tokio/blob/718d6ce8cac9f2e081c0a...) It isn't trivial to pick up from scratch, especially if one comes from a much higher level language (C#, Java, python, etc.). This is true even for people who are very experienced writing high-quality, durable, and safe code in other languages (e.g., C++) without the help of a compiler, because the ownership and lifetime model are both different and compiler-enforced.
In Rusty ownership and the lifecycle’s stone
Let me ask you this. All nonsense aside about like... standard discussion and what not. Say I write a Rust program to use `reqwest` to make a HTTP request to some API that is going to return me JSON. I can compile it to... ELF with Rust I guess on Linux, or I can use Rust to compile it to: > wasm32-wasi - when using wasmtime this is likely what you'll be using. The WASI target is integrated into the standard library and is intended on producing standalone binaries. > wasm32-unknown-unknown - this target, like the WASI one, is focused on producing single .wasm binaries. The standard library, however, is largely stubbed out since the "unknown" part of the target means libstd can't assume anything. This means that while binaries will likely work in wasmtime, common conveniences like println! or panic! won't work. > wasm32-unknown-emscripten
Read the rest
- this target is intended to work in a web browser and produces a .wasm file coupled with a *.js file, and it is not compatible with wasmtime. Say the Tokio async runtime works for wasm32-wasi (I don't think it does currently, I could be wrong) and reqwest + all of its network dependencies compile to wasm32-wasi (not sure if they do, I think there is progress) and say lite-json or some kind of JSON de-serizaliation works Why would I compile + run as wasm32-wasi instead of stable-x86_64-unknown-linux-gnu? Interesting links: https://github.com/tokio-rs/tokio/issues/4827 - tokio support https://github.com/async-rs/async-std/issues/505 - async-std support https://www.reddit.com/r/rust/comments/h9bakg/could_not_find... - > There's no blocking implementation available for WASM. The WASM backend uses HTML APIs (fetch) and is supposed to run in a browser, where you can't block the event loop
In Wasmer 3.0
> If you can mutate through a shared reference, then there is no need to alias `&mut T`s in the first place! Unfortunately that is not true. See [1] as an example is core where mutable aliasing is needed (async generators). In this case they just added to compiler hack [2][3], but this really needs proper support in rust. Something like “AliasCell”. [1] https://github.com/rust-lang/rust/issues/63818 [2] https://github.com/rust-lang/rust/pull/82834 [3] https://github.com/tokio-rs/tokio/pull/3654
In Lifetime Annotations for C++

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.