[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5370":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":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},5370,"axum","tokio-rs\u002Faxum","tokio-rs","HTTP routing and request-handling library for Rust that focuses on ergonomics and modularity","",null,"Rust",26228,1418,150,36,0,13,91,344,66,44.46,"MIT License",false,"main",[26,27,28],"http","routing","rust","2026-06-12 02:01:09","# axum\n\n`axum` is an HTTP routing and request-handling library that focuses on ergonomics and modularity.\n\n[![Build status](https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Factions\u002Fworkflows\u002FCI.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Factions\u002Fworkflows\u002FCI.yml)\n[![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Faxum)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Faxum)\n[![Documentation](https:\u002F\u002Fdocs.rs\u002Faxum\u002Fbadge.svg)][docs]\n\nMore information about this crate can be found in the [crate documentation][docs].\n\n## High level features\n\n- Route requests to handlers with a macro free API.\n- Declaratively parse requests using extractors.\n- Simple and predictable error handling model.\n- Generate responses with minimal boilerplate.\n- Take full advantage of the [`tower`] and [`tower-http`] ecosystem of\n  middleware, services, and utilities.\n\nIn particular the last point is what sets `axum` apart from other libraries \u002F frameworks.\n`axum` doesn't have its own middleware system but instead uses\n[`tower::Service`]. This means `axum` gets timeouts, tracing, compression,\nauthorization, and more, for free. It also enables you to share middleware with\napplications written using [`hyper`] or [`tonic`].\n\n## ⚠ Breaking changes ⚠\n\nWe are currently working towards axum 0.9 so the `main` branch contains breaking\nchanges. See the [`0.8.x`] branch for what's released to crates.io.\n\n[`0.8.x`]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Ftree\u002Fv0.8.x\n\n## Usage example\n\n```rust\nuse axum::{\n    routing::{get, post},\n    http::StatusCode,\n    Json, Router,\n};\nuse serde::{Deserialize, Serialize};\n\n#[tokio::main]\nasync fn main() {\n    \u002F\u002F initialize tracing\n    tracing_subscriber::fmt::init();\n\n    \u002F\u002F build our application with a route\n    let app = Router::new()\n        \u002F\u002F `GET \u002F` goes to `root`\n        .route(\"\u002F\", get(root))\n        \u002F\u002F `POST \u002Fusers` goes to `create_user`\n        .route(\"\u002Fusers\", post(create_user));\n\n    \u002F\u002F run our app with hyper, listening globally on port 3000\n    let listener = tokio::net::TcpListener::bind(\"0.0.0.0:3000\").await.unwrap();\n    axum::serve(listener, app).await;\n}\n\n\u002F\u002F basic handler that responds with a static string\nasync fn root() -> &'static str {\n    \"Hello, World!\"\n}\n\nasync fn create_user(\n    \u002F\u002F this argument tells axum to parse the request body\n    \u002F\u002F as JSON into a `CreateUser` type\n    Json(payload): Json\u003CCreateUser>,\n) -> (StatusCode, Json\u003CUser>) {\n    \u002F\u002F insert your application logic here\n    let user = User {\n        id: 1337,\n        username: payload.username,\n    };\n\n    \u002F\u002F this will be converted into a JSON response\n    \u002F\u002F with a status code of `201 Created`\n    (StatusCode::CREATED, Json(user))\n}\n\n\u002F\u002F the input to our `create_user` handler\n#[derive(Deserialize)]\nstruct CreateUser {\n    username: String,\n}\n\n\u002F\u002F the output to our `create_user` handler\n#[derive(Serialize)]\nstruct User {\n    id: u64,\n    username: String,\n}\n```\n\nYou can find this [example][readme-example] as well as other example projects in\nthe [example directory][examples].\n\nSee the [crate documentation][docs] for way more examples.\n\n## Performance\n\n`axum` is a relatively thin layer on top of [`hyper`] and adds very little\noverhead. So `axum`'s performance is comparable to [`hyper`]. You can find\nbenchmarks [here](https:\u002F\u002Fgithub.com\u002Fprogramatik29\u002Frust-web-benchmarks) and\n[here](https:\u002F\u002Fweb-frameworks-benchmark.netlify.app\u002Fresult?l=rust).\n\n## Safety\n\nThis crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in\n100% safe Rust.\n\n## Minimum supported Rust version\n\naxum's MSRV is 1.80.\n\n## Examples\n\nThe [examples] folder contains various examples of how to use `axum`. The\n[docs] also provide lots of code snippets and examples.\n\n## Getting Help\n\nIn the `axum`'s repo we also have a [number of examples][examples] showing how\nto put everything together. You're also welcome to ask in the [Discord channel][chat] or open a [discussion] with your question.\n\n## Contributing\n\n🎈 Thanks for your help improving the project! We are so happy to have\nyou! We have a [contributing guide][contributing] to help you get involved in the\n`axum` project.\n\n## License\n\nThis project is licensed under the [MIT license][license].\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in `axum` by you, shall be licensed as MIT, without any\nadditional terms or conditions.\n\n[readme-example]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Ftree\u002Fmain\u002Fexamples\u002Freadme\n[examples]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Ftree\u002Fmain\u002Fexamples\n[docs]: https:\u002F\u002Fdocs.rs\u002Faxum\n[`tower`]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Ftower\n[`hyper`]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Fhyper\n[`tower-http`]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Ftower-http\n[`tonic`]: https:\u002F\u002Fcrates.io\u002Fcrates\u002Ftonic\n[contributing]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Fblob\u002Fmain\u002FCONTRIBUTING.md\n[chat]: https:\u002F\u002Fdiscord.gg\u002Ftokio\n[discussion]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Fdiscussions\u002Fnew?category=q-a\n[`tower::Service`]: https:\u002F\u002Fdocs.rs\u002Ftower\u002Flatest\u002Ftower\u002Ftrait.Service.html\n[license]: https:\u002F\u002Fgithub.com\u002Ftokio-rs\u002Faxum\u002Fblob\u002Fmain\u002Faxum\u002FLICENSE\n","axum 是一个专注于人体工程学和模块化的 Rust 语言 HTTP 路由与请求处理库。它通过无宏 API 实现路由请求到处理器，支持声明式解析请求、简单且可预测的错误处理模型以及以最少样板代码生成响应。特别是 axum 利用了 tower 和 tower-http 生态系统中的中间件和服务，这意味着它可以免费获得超时、追踪、压缩、授权等功能，并能与使用 hyper 或 tonic 构建的应用共享中间件。axum 适用于需要构建高效、可维护 Web 应用或微服务的场景，尤其适合那些希望充分利用 Rust 异步特性的开发者。",2,"2026-06-11 03:02:51","top_language"]