[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5591":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},5591,"mio","tokio-rs\u002Fmio","tokio-rs","Metal I\u002FO library for Rust.","",null,"Rust",7019,839,122,16,0,3,11,58,10,82.07,"MIT License",false,"master",[26,27,28,29],"asynchronous","networking","non-blocking","rust","2026-06-12 04:00:25","# Mio – Metal I\u002FO\n\nMio is a fast, low-level I\u002FO library for Rust focusing on non-blocking APIs and\nevent notification for building high performance I\u002FO apps with as little\noverhead as possible over the OS abstractions.\n\n[![Crates.io][crates-badge]][crates-url]\n[![MIT licensed][mit-badge]][mit-url]\n[![Build Status][actions-badge]][actions-url]\n\n[crates-badge]: https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fmio.svg\n[crates-url]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Fmio\n[mit-badge]: https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg\n[mit-url]: LICENSE\n[actions-badge]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Fmio\u002Fworkflows\u002FCI\u002Fbadge.svg\n[actions-url]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Fmio\u002Factions?query=workflow%3ACI+branch%3Amaster\n\n**API documentation**\n\n* [v1](https:\u002F\u002Fdocs.rs\u002Fmio\u002F^1)\n* [v0.8](https:\u002F\u002Fdocs.rs\u002Fmio\u002F^0.8)\n\nThis is a low level library, if you are looking for something easier to get\nstarted with, see [Tokio](https:\u002F\u002Ftokio.rs).\n\n## Usage\n\nTo use `mio`, first add this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nmio = \"1\"\n```\n\nNext we can start using Mio. The following is quick introduction using\n`TcpListener` and `TcpStream`. Note that `features = [\"os-poll\", \"net\"]` must be\nspecified for this example.\n\n```rust\nuse std::error::Error;\n\nuse mio::net::{TcpListener, TcpStream};\nuse mio::{Events, Interest, Poll, Token};\n\n\u002F\u002F Some tokens to allow us to identify which event is for which socket.\nconst SERVER: Token = Token(0);\nconst CLIENT: Token = Token(1);\n\nfn main() -> Result\u003C(), Box\u003Cdyn Error>> {\n    \u002F\u002F Create a poll instance.\n    let mut poll = Poll::new()?;\n    \u002F\u002F Create storage for events.\n    let mut events = Events::with_capacity(128);\n\n    \u002F\u002F Setup the server socket.\n    let addr = \"127.0.0.1:13265\".parse()?;\n    let mut server = TcpListener::bind(addr)?;\n    \u002F\u002F Start listening for incoming connections.\n    poll.registry()\n        .register(&mut server, SERVER, Interest::READABLE)?;\n\n    \u002F\u002F Setup the client socket.\n    let mut client = TcpStream::connect(addr)?;\n    \u002F\u002F Register the socket.\n    poll.registry()\n        .register(&mut client, CLIENT, Interest::READABLE | Interest::WRITABLE)?;\n\n    \u002F\u002F Start an event loop.\n    loop {\n        \u002F\u002F Poll Mio for events, blocking until we get an event.\n        poll.poll(&mut events, None)?;\n\n        \u002F\u002F Process each event.\n        for event in events.iter() {\n            \u002F\u002F We can use the token we previously provided to `register` to\n            \u002F\u002F determine for which socket the event is.\n            match event.token() {\n                SERVER => {\n                    \u002F\u002F If this is an event for the server, it means a connection\n                    \u002F\u002F is ready to be accepted.\n                    \u002F\u002F\n                    \u002F\u002F Accept the connection and drop it immediately. This will\n                    \u002F\u002F close the socket and notify the client of the EOF.\n                    let connection = server.accept();\n                    drop(connection);\n                }\n                CLIENT => {\n                    if event.is_writable() {\n                        \u002F\u002F We can (likely) write to the socket without blocking.\n                    }\n\n                    if event.is_readable() {\n                        \u002F\u002F We can (likely) read from the socket without blocking.\n                    }\n\n                    \u002F\u002F Since the server just shuts down the connection, let's\n                    \u002F\u002F just exit from our event loop.\n                    return Ok(());\n                }\n                \u002F\u002F We don't expect any events with tokens other than those we provided.\n                _ => unreachable!(),\n            }\n        }\n    }\n}\n```\n\n## Features\n\n* Non-blocking TCP, UDP, UDS\n* I\u002FO event queue backed by epoll, kqueue, and IOCP\n* Zero allocations at runtime\n* Platform specific extensions\n\n## Non-goals\n\nThe following are specifically omitted from Mio and are left to the user\nor higher-level libraries.\n\n* File operations\n* Thread pools \u002F multi-threaded event loop\n* Timers\n\n## Platforms\n\nCurrently supported platforms:\n\n* Android (API level 21)\n* DragonFly BSD\n* FreeBSD\n* Linux\n* NetBSD\n* OpenBSD\n* Windows\n* iOS\n* macOS\n\nMio can handle interfacing with each of the event systems of the aforementioned\nplatforms. The details of their implementation are further discussed in the\n`Poll` type of the API documentation (see above).\n\nMio generally supports the same versions of the above mentioned platforms as\nRust the language (rustc) does, unless otherwise noted.\n\nThe Windows implementation for polling sockets is using the [wepoll] strategy.\nThis uses the Windows AFD system to access socket readiness events.\n\n[wepoll]: https:\u002F\u002Fgithub.com\u002Fpiscisaureus\u002Fwepoll\n\n### Unsupported\n\n* Wine, see [issue #1444]\n\n[issue #1444]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Fmio\u002Fissues\u002F1444\n\n## MSRV Policy\n\nThe MSRV (Minimum Supported Rust Version) is fixed for a given minor (1.x)\nversion. However it can be increased when bumping minor versions, i.e. going\nfrom 1.0 to 1.1 allows us to increase the MSRV. Users unable to increase their\nRust version can use an older minor version instead. Below is a list of Mio versions\nand their MSRV:\n\n * v0.8: Rust 1.46.\n * v1.0: Rust 1.70.\n * v1.1: Rust 1.71.\n * v1.2: Rust 1.71.\n\nNote however that Mio also has dependencies, which might have different MSRV\npolicies. We try to stick to the above policy when updating dependencies, but\nthis is not always possible.\n\n## Unsupported flags\n\nMio uses different implementations to support the same functionality depending\non the platform. Mio generally uses the \"best\" implementation possible, where\n\"best\" usually means most efficient for Mio's use case. However this means that\nthe implementation is often specific to a limited number of platforms, meaning\nwe often have multiple implementations for the same functionality. In some cases\nit might be required to not use the \"best\" implementation, but another\nimplementation Mio supports (on other platforms). **Mio does not officially\nsupport secondary implementations on platforms**, however we do have various cfg\nflags to force another implementation for these situations.\n\nCurrent flags:\n * `mio_unsupported_force_poll_poll`, uses an implementation based on `poll(2)`\n   for `mio::Poll`.\n * `mio_unsupported_force_waker_pipe`, uses an implementation based on `pipe(2)`\n   for `mio::Waker`.\n\n**Again, Mio does not officially supports this**. Furthermore these flags may\ndisappear in the future.\n\n## Community\n\nA group of Mio users hang out on [Discord], this can be a good place to go for\nquestions. It's also possible to open a [new issue on GitHub] to ask questions,\nreport bugs or suggest new features.\n\n[Discord]: https:\u002F\u002Fdiscord.gg\u002Ftokio\n[new issue on GitHub]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Fmio\u002Fissues\u002Fnew\n\n## Contributing\n\nInterested in getting involved? We would love to help you! For simple\nbug fixes, just submit a PR with the fix and we can discuss the fix\ndirectly in the PR. If the fix is more complex, start with an issue.\n\nIf you want to propose an API change, create an issue to start a\ndiscussion with the community. Also, feel free to talk with us in Discord.\n\nFinally, be kind. We support the [Rust Code of Conduct](https:\u002F\u002Fwww.rust-lang.org\u002Fpolicies\u002Fcode-of-conduct).\n","Mio 是一个专注于非阻塞 API 和事件通知的 Rust 低级 I\u002FO 库，旨在以尽可能少的系统抽象开销构建高性能 I\u002FO 应用。它提供了快速且高效的异步网络通信功能，支持多种操作系统，并通过事件驱动模型实现高效的数据处理。Mio 适用于需要直接控制底层 I\u002FO 操作的场景，特别是那些对性能有极高要求的应用程序，如实时数据处理、高频交易系统或大规模分布式服务。对于寻求更高级别抽象的开发者，推荐使用基于 Mio 构建的 Tokio 框架。",2,"2026-06-11 03:04:16","top_language"]