[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5724":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":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":21,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":16,"starSnapshotCount":16,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},5724,"monoio","bytedance\u002Fmonoio","bytedance","Rust async runtime based on io-uring.","",null,"Rust",5014,290,51,59,0,15,43,38.39,"Apache License 2.0",false,"master",[],"2026-06-12 02:01:14","# Monoio\nA thread-per-core Rust runtime with io_uring\u002Fepoll\u002Fkqueue.\n\n[![Crates.io][crates-badge]][crates-url]\n[![MIT\u002FApache-2 licensed][license-badge]][license-url]\n[![Build Status][actions-badge]][actions-url]\n[![Codecov][codecov-badge]][codecov-url]\n[![FOSSA Status](https:\u002F\u002Fapp.fossa.com\u002Fapi\u002Fprojects\u002Fgit%2Bgithub.com%2Fbytedance%2Fmonoio.svg?type=shield)](https:\u002F\u002Fapp.fossa.com\u002Fprojects\u002Fgit%2Bgithub.com%2Fbytedance%2Fmonoio?ref=badge_shield)\n[中文说明][zh-readme-url]\n\n[crates-badge]: https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Fmonoio.svg\n[crates-url]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Fmonoio\n[license-badge]: https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fl\u002Fmonoio.svg\n[license-url]: LICENSE-MIT\n[actions-badge]: https:\u002F\u002Fgithub.com\u002Fbytedance\u002Fmonoio\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg\n[actions-url]: https:\u002F\u002Fgithub.com\u002Fbytedance\u002Fmonoio\u002Factions\n[codecov-badge]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fbytedance\u002Fmonoio\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg?token=3MSAMJ6X3E\n[codecov-url]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fbytedance\u002Fmonoio\n[zh-readme-url]: README-zh.md\n\n## Design Goal\nMonoio is a pure io_uring\u002Fepoll\u002Fkqueue Rust async runtime. Part of the design has been borrowed from Tokio and Tokio-uring. However, unlike Tokio-uring, Monoio does not run on top of another runtime, rendering it more efficient.\n\nMoreover, Monoio is designed with a thread-per-core model in mind. Users do not need to worry about tasks being `Send` or `Sync`, as thread local storage can be used safely. In other words, the data does not escape the thread on await points, unlike on work-stealing runtimes such as Tokio. This is because for some use cases, specifically those targeted by this runtime, it is not necessary to make task schedulable between threads. For example, if we were to write a load balancer like NGINX, we would write it in a thread-per-core way. The thread local data does not need to be shared between threads, so the `Sync` and `Send` do not need to be implemented in the first place.\n\nAs you may have guessed, this runtime is primarily targeted at servers, where operations are io-bound on network sockets, and therefore the use of native asynchronous I\u002FO APIs maximizes the throughput of the server. In order for Monoio to be as efficient as possible, we've enabled some unstable Rust features, and we've designed a whole new IO abstraction, which unfortunately may cause some compatibility problems. [Our benchmarks](https:\u002F\u002Fgithub.com\u002Fbytedance\u002Fmonoio\u002Fblob\u002Fmaster\u002Fdocs\u002Fen\u002Fbenchmark.md) prove that, for our use-cases, Monoio has a better performance than other Rust runtimes.\n\n## Quick Start\nTo use monoio, you need rust 1.75. If you already installed it, please make sure it is the latest version.\n\nAlso, if you want to use io_uring, you must make sure your kernel supports it([5.6+](docs\u002Fen\u002Fplatform-support.md)). And, memlock is [configured as a proper number](docs\u002Fen\u002Fmemlock.md). If your kernel version does not meet the requirements, you can try to use the legacy driver to start, currently supports Linux and macOS([ref here](\u002Fdocs\u002Fen\u002Fuse-legacy-driver.md)).\n\n🚧Experimental windows support is on the way.\n\nHere is a basic example of how to use Monoio.\n\n```rust,no_run\n\u002F\u002F\u002F A echo example.\n\u002F\u002F\u002F\n\u002F\u002F\u002F Run the example and `nc 127.0.0.1 50002` in another shell.\n\u002F\u002F\u002F All your input will be echoed out.\nuse monoio::io::{AsyncReadRent, AsyncWriteRentExt};\nuse monoio::net::{TcpListener, TcpStream};\n\n#[monoio::main]\nasync fn main() {\n    let listener = TcpListener::bind(\"127.0.0.1:50002\").unwrap();\n    println!(\"listening\");\n    loop {\n        let incoming = listener.accept().await;\n        match incoming {\n            Ok((stream, addr)) => {\n                println!(\"accepted a connection from {}\", addr);\n                monoio::spawn(echo(stream));\n            }\n            Err(e) => {\n                println!(\"accepted connection failed: {}\", e);\n                return;\n            }\n        }\n    }\n}\n\nasync fn echo(mut stream: TcpStream) -> std::io::Result\u003C()> {\n    let mut buf: Vec\u003Cu8> = Vec::with_capacity(8 * 1024);\n    let mut res;\n    loop {\n        \u002F\u002F read\n        (res, buf) = stream.read(buf).await;\n        if res? == 0 {\n            return Ok(());\n        }\n\n        \u002F\u002F write all\n        (res, buf) = stream.write_all(buf).await;\n        res?;\n\n        \u002F\u002F clear\n        buf.clear();\n    }\n}\n```\n\nYou can find more example code in `examples` of this repository.\n\n## Limitations\n1. On Linux 5.6 or newer, Monoio can use uring or epoll as io driver. On lower versions of Linux, it can only run in epoll mode. On macOS, kqueue can be used. Other platforms are currently not supported.\n2. Monoio can not solve all problems. If the workload is very unbalanced, it may cause performance degradation than Tokio since CPU cores may not be fully utilized.\n\n## Contributors\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbytedance\u002Fmonoio\u002Fgraphs\u002Fcontributors\">\u003Cimg src=\"https:\u002F\u002Fopencollective.com\u002Fmonoio\u002Fcontributors.svg?width=890&button=false\" \u002F>\u003C\u002Fa>\n\nThanks for their contributions!\n\n## Associated Projects\n- [local-sync](https:\u002F\u002Fgithub.com\u002Fmonoio-rs\u002Flocal-sync): A thread local channel.\n- [monoio-tls](https:\u002F\u002Fgithub.com\u002Fmonoio-rs\u002Fmonoio-tls): TLS wrapper for Monoio.\n- [monoio-codec](https:\u002F\u002Fgithub.com\u002Fmonoio-rs\u002Fmonoio-codec): Codec utility for Monoio.\n\nHTTP framework and RPC framework are on the way.\n\n## Licenses\nMonoio is licensed under the MIT license or Apache license.\n\nDuring developing we referenced a lot from Tokio, Mio, Tokio-uring and other related projects. We would like to thank the authors of these projects.\n\n\n[![FOSSA Status](https:\u002F\u002Fapp.fossa.com\u002Fapi\u002Fprojects\u002Fgit%2Bgithub.com%2Fbytedance%2Fmonoio.svg?type=large)](https:\u002F\u002Fapp.fossa.com\u002Fprojects\u002Fgit%2Bgithub.com%2Fbytedance%2Fmonoio?ref=badge_large)\n","Monoio 是一个基于 io_uring 的 Rust 异步运行时。它采用每核一线程的设计模型，支持 io_uring、epoll 和 kqueue 等 I\u002FO 技术，旨在提供高效的异步 I\u002FO 操作。项目设计借鉴了 Tokio 和 Tokio-uring 的部分理念，但与它们不同的是，Monoio 不依赖于其他运行时，直接利用底层异步 I\u002FO API，从而实现更高的性能。此外，Monoio 通过线程局部存储来确保数据不会在 await 点逃逸，避免了 `Send` 和 `Sync` 的约束，特别适用于对 I\u002FO 绑定操作要求高的服务器场景，如负载均衡器等。该项目主要针对需要最大化网络套接字吞吐量的应用程序，并通过启用一些不稳定的 Rust 特性和全新的 I\u002FO 抽象来进一步优化性能。",2,"2026-06-11 03:04:54","top_language"]