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

mio

Metal I/O library for Rust.

30Distinct people
34Mentions
0Explicit recommenders
7.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Metal I/O library for Rust.

GitHub

Where it is used

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

What people are saying

No recommendation phrase was found in the indexed comments.

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

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 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 year34 dated mentions

Observed mentions: 2014-09-16 05:13:52 UTC to 2026-08-22 20:43:57 UTC.

02462014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments20142015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 6 mentions; 1 submissions, 5 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 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
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC707
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC615
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC615
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC514
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC312
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
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
Mio – Metal I/O Mio is a fast, low-level I/O library for Rust focusing on non-blocking APIs and event notification for building high performance I/O apps with as little overhead as possible over the OS abstractions. API documentation v1 v0.8 This is a low level library, if you are looking for something easier to get started with, see Tokio. Usage To use mio, first add this to your Cargo.toml: [dependencies] mio = "1" Next we can start using Mio. The following is a quick introduction using TcpListener and TcpStream. Note that features = ["os-poll", "net"] must be specified for this example. use std::error::Error; use mio::net::{TcpListener, TcpStream}; use mio::{Events, Interest, Poll, Token}; // Some tokens to allow us to identify which event is for which socket. const SERVER: Token = Token(0); const CLIENT: Token = Token(1); fn main() -> Result<(), Box<dyn Error>> { // Create a poll instance. let mut poll = Poll::new()?; // Create storage for events. let mut events = Events::with_capacity(128); // Setup the server socket. let addr = "127.0.0.1:13265".parse()?; let mut server = TcpListener::bind(addr)?; // Start listening for incoming connections. poll.registry() .register(&mut server, SERVER, Interest::READABLE)?; // Setup the client socket. let mut client = TcpStream::connect(addr)?; // Register the socket. poll.registry() .register(&mut client, CLIENT, Interest::READABLE | Interest::WRITABLE)?; // Start an event loop. loop { // Poll Mio for events, blocking until we get an event. poll.poll(&mut events, None)?; // Process each event. for event in events.iter() { // We can use the token we previously provided to `register` to // determine for which socket the event is. match event.token() { SERVER => { // If this is an event for the server, it means a connection // is ready to be accepted. // // Accept the connection and drop it immediately. This will // close the socket and notify the client of the EOF. let connection = server.accept(); drop(connection); } CLIENT => { if event.is_writable() { // We can (likely) write to the socket without blocking. } if event.is_readable() { // We can (likely) read from the socket without blocking. } // Since the server just shuts down the connection, let's // just exit from our event loop. return Ok(()); } // We don't expect any events with tokens other than those we provided. _ => unreachable!(), } } } } Features Non-blocking TCP, UDP, UDS I/O event queue backed by epoll, kqueue, and IOCP Zero allocations at runtime Platform specific extensions Non-goals The following are specifically omitted from Mio and are left to the user or higher-level libraries. File operations Thread pools / multi-threaded event loop Timers Platforms Currently supported platforms: Android (API level 21) DragonFly BSD FreeBSD Linux NetBSD OpenBSD WASI Windows Wine iOS macOS Solaris Mio can handle interfacing with each of the event systems of the aforementioned platforms. The details of their implementation are further discussed in the Poll type of the API documentation (see above). Mio generally supports the same versions of the above mentioned platforms as Rust the language (rustc) does, unless otherwise noted. The Windows implementation for polling sockets is using the wepoll strategy. This uses the Windows AFD system to access socket readiness events. MSRV Policy The MSRV (Minimum Supported Rust Version) is fixed for a given minor (1.x) version. However it can be increased when bumping minor versions, i.e. going from 1.0 to 1.1 allows us to increase the MSRV. Users unable to increase their Rust version can use an older minor version instead. Below is a list of Mio versions and their MSRV: v0.8: Rust 1.46. v1.0: Rust 1.70. v1.1: Rust 1.71. v1.2: Rust 1.71. Note however that Mio also has dependencies, which might have different MSRV policies. We try to stick to the above policy when updating dependencies, but this is not always possible. Unsupported flags Mio uses different implementations to support the same functionality depending on the platform. Mio generally uses the "best" implementation possible, where "best" usually means most efficient for Mio's use case. However this means that the implementation is often specific to a limited number of platforms, meaning we often have multiple implementations for the same functionality. In some cases it might be required to not use the "best" implementation, but another implementation Mio supports (on other platforms). Mio does not officially support secondary implementations on platforms, however we do have various cfg flags to force another implementation for these situations. Current flags: mio_unsupported_force_poll_poll, uses an implementation based on poll(2) for mio::Poll. mio_unsupported_force_waker_pipe, uses an implementation based on pipe(2) for mio::Waker. Again, Mio does not officially supports this. Furthermore these flags may disappear in the future. Community A group of Mio users hang out on Discord, this can be a good place to go for questions. It's also possible to open a new issue on GitHub to ask questions, report bugs or suggest new features. Contributing Interested in getting involved? We would love to help you! For simple bug fixes, just submit a PR with the fix and we can discuss the fix directly in the PR. If the fix is more complex, start with an issue. If you want to propose an API change, create an i
Read the full README on GitHub

What Hacker News says

34 sources
My example was "twice by one developer", not "twice across all indexed repos." A spot check shows that quite a few in your link are used specifically to ensure correct handling of Rust multi-level breaks work syntax, like https://github.com/rust-lang/rust-analyzer/blob/master/crate... , https://github.com/rust-lang/rustfmt/blob/master/tests/sourc... , https://github.com/rust-lang/rust/blob/master/src/tools/rust... , https://github.com/rust-lang/rust/blob/master/src/tools/rust... and likely more. Another is a translation of BASIC code to Rust, using break as a form of goto. https://github.com/coding-horror/basic-computer-games/blob/e... . The Python version at https://github.com/coding-horror/basic-computer-games/blob/e... doesn't use that approach. The example at https://github.com/tokio-rs/mio/blob/master/tests/tcp.rs is a nice one /
Read the rest
/ Wait for our TCP stream to connect 'outer: loop { poll.poll(&mut events, None).unwrap(); for event in events.iter() { if event.token() == Token(1) && event.is_writable() { break 'outer; } } } though it can be replaced with a helper-function (note: I don't fully know what the code is doing, but the following looks right): def find_writable_event(events): for event in events: if event.token() == Token(1) and event.is_writable(): return True while 1: poll.poll(events, None) if find_writable_event(events): break So while there's likely a good real-world example of something which can't easily be re-written in an alternative form for Python, simply pointing to a grep result isn't all that persuasive.
In Python multi-level break and continue
> Managing build configurations... In terms of package management, you can apply rules to what crates you want to include; including specific platform constraints. [target.'cfg(target_os = "linux")'.dependencies] nix = "0.5" On the code side it's pretty much the same as C++. You have a module that defines an interface and per-platform implementations that are included depending on a "configuration conditional check" #[cfg(target_os = "linux")] macro. https://github.com/tokio-rs/mio/blob/c6b5f13adf67483d927b176...
In Ask HN: Has any Rust developer moved to embedded device programming?
Some are other will be other won't. One problem with io_uring is that it's completion based I/O where you move ownership of an buffer to the kernel which then writes to it until the operation completes. This means you might not be able to (sync) cancel an operation occurring in the background. This makes it harder to integrate into some I/O libraries, as the previous fact conflicts with RAII patterns. Another think making adaption harder is that the interfaces for reading/writing with io_uring are conceptually slightly different. Because of this e.g. Tokio currently hasn't switched yet to use io_uring but still uses readiness based async I/O as far as I know. (Which doesn't mean it won't support it in the future.) This issue might be relevant (mio is internally used by tokio for async I/O): https://github.com/tokio-rs/mio/issues/923
In How io_uring and eBPF Will Revolutionize Programming in Linux
Rust Core team member here. Out of the box, the Rust standard library only provides very basic networking support [1]. If you want to process requests in parallel, then yes you need to spawn an OS thread to process the request. We went with this model because we wanted to have the standard library be portable across all our supported platforms, and there isn't really a great standard for doing portable IO. Instead, we're layering platform-specific code in external libraries. At the raw C-level bindings, we have libc [2] and winapi [3]. For higher level APIs, we've got Mio [4] which abstracts the system APIs, and now Tokio [5], which uses futures to simplify async operations. We're just working our way up the stack. All of these are being developed by members of the various Rust teams, so they're as "official" as everything else we're doin
Read the rest
In Rust vs. Go
Rust has had https://github.com/carllerche/mio for two years now, longer than Rust itself has been stable. tokio is just a higher-level, nicer, API. ESR knows this. It was there in the comments of his previous issue. Yet he chooses to link to a two-year old issue with one comment that says that Rust doesn't have epoll as a source of truth. Mio can't compare to the baked-in goroutine goodies (neither can epoll in C!), but this blog post is outright dishonest.
In Rust vs. Go

Showing the 15 most recent of 34 sources. Enable JavaScript to search and browse every indexed mention.

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.