[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5634":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":28,"discoverSource":29},5634,"iron","iron\u002Firon","An Extensible, Concurrent Web Framework for Rust","",null,"Rust",6109,394,152,47,0,2,4,1,38.79,"MIT License",false,"master",true,[],"2026-06-12 02:01:13","# Iron\n\n[![Build Status](https:\u002F\u002Fsecure.travis-ci.org\u002Firon\u002Firon.svg?branch=master)](https:\u002F\u002Ftravis-ci.org\u002Firon\u002Firon)\n[![Crates.io Status](http:\u002F\u002Fmeritbadge.herokuapp.com\u002Firon)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Firon)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](https:\u002F\u002Fraw.githubusercontent.com\u002Firon\u002Firon\u002Fmaster\u002FLICENSE)\n\n> Extensible, Concurrency Focused Web Development in Rust.\n\n## Response Timer Example\n\nNote: This example works with the current `iron` code in this repository (master branch). If you are using `iron` 0.6 from crates.io, please refer to the [corresponding example](https:\u002F\u002Fgithub.com\u002Firon\u002Firon\u002Fblob\u002F0.6-maintenance\u002FREADME.md) in the branch [0.6-maintenance](https:\u002F\u002Fgithub.com\u002Firon\u002Firon\u002Ftree\u002F0.6-maintenance).\n\n```rust\nextern crate iron;\nextern crate time;\n\nuse iron::prelude::*;\nuse iron::{typemap, AfterMiddleware, BeforeMiddleware};\nuse time::precise_time_ns;\n\nstruct ResponseTime;\n\nimpl typemap::Key for ResponseTime { type Value = u64; }\n\nimpl BeforeMiddleware for ResponseTime {\n    fn before(&self, req: &mut Request) -> IronResult\u003C()> {\n        req.extensions.insert::\u003CResponseTime>(precise_time_ns());\n        Ok(())\n    }\n}\n\nimpl AfterMiddleware for ResponseTime {\n    fn after(&self, req: &mut Request, res: Response) -> IronResult\u003CResponse> {\n        let delta = precise_time_ns() - *req.extensions.get::\u003CResponseTime>().unwrap();\n        println!(\"Request took: {} ms\", (delta as f64) \u002F 1000000.0);\n        Ok(res)\n    }\n}\n\nfn hello_world(_: &mut Request) -> IronResult\u003CResponse> {\n    Ok(Response::with((iron::StatusCode::OK, \"Hello World\")))\n}\n\nfn main() {\n    let mut chain = Chain::new(hello_world);\n    chain.link_before(ResponseTime);\n    chain.link_after(ResponseTime);\n    Iron::new(chain).http(\"localhost:3000\");\n}\n```\n\n## Overview\n\nIron is a high level web framework built in and for Rust, built on\n[hyper](https:\u002F\u002Fgithub.com\u002Fhyperium\u002Fhyper). Iron is designed to take advantage\nof Rust's greatest features - its excellent type system and its principled\napproach to ownership in both single threaded and multi threaded contexts.\n\nIron is highly concurrent and can scale horizontally on more machines behind a\nload balancer or by running more threads on a more powerful machine. Iron\navoids the bottlenecks encountered in highly concurrent code by avoiding shared\nwrites and locking in the core framework.\n\nIron is 100% safe code:\n\n```sh\n$ rg unsafe src | wc\n       0       0       0\n```\n\n## Philosophy\n\nIron is meant to be as extensible and pluggable as possible; Iron's core is\nconcentrated and avoids unnecessary features by leaving them to middleware,\nplugins, and modifiers.\n\nMiddleware, Plugins, and Modifiers are the main ways to extend Iron with new\nfunctionality. Most extensions that would be provided by middleware in other\nweb frameworks are instead addressed by the much simpler Modifier and Plugin\nsystems.\n\nModifiers allow external code to manipulate Requests and Response in an ergonomic\nfashion, allowing third-party extensions to get the same treatment as modifiers\ndefined in Iron itself. Plugins allow for lazily-evaluated, automatically cached\nextensions to Requests and Responses, perfect for parsing, accessing, and\notherwise lazily manipulating an http connection.\n\nMiddleware are only used when it is necessary to modify the control flow of a\nRequest flow, hijack the entire handling of a Request, check an incoming\nRequest, or to do final post-processing. This covers areas such as routing,\nmounting, static asset serving, final template rendering, authentication, and\nlogging.\n\nIron comes with only basic modifiers for setting the status, body, and various\nheaders, and the infrastructure for creating modifiers, plugins, and\nmiddleware. No plugins or middleware are bundled with Iron.\n\n## Performance\n\nIron averages [72,000+ requests per second for hello world](https:\u002F\u002Fgithub.com\u002Firon\u002Firon\u002Fwiki\u002FHow-to-Benchmark-hello.rs-Example)\nand is mostly IO-bound, spending over 70% of its time in the kernel send-ing or\nrecv-ing data.\\*\n\n\\* _Numbers from profiling on my OS X machine, your mileage may vary._\n\n## Core Extensions\n\nIron aims to fill a void in the Rust web stack - a high level framework that is\n_extensible_ and makes organizing complex server code easy.\n\nExtensions are painless to build. Some important ones are:\n\nMiddleware:\n\n- [Routing](https:\u002F\u002Fgithub.com\u002Firon\u002Frouter)\n- [Mounting](https:\u002F\u002Fgithub.com\u002Firon\u002Fmount)\n- [Static File Serving](https:\u002F\u002Fgithub.com\u002Firon\u002Fstaticfile)\n- [Logging](https:\u002F\u002Fgithub.com\u002Firon\u002Flogger)\n\nPlugins:\n\n- [JSON Body Parsing](https:\u002F\u002Fgithub.com\u002Firon\u002Fbody-parser)\n- [URL Encoded Data Parsing](https:\u002F\u002Fgithub.com\u002Firon\u002Furlencoded)\n- [All-In-One (JSON, URL, & Form Data) Parameter Parsing](https:\u002F\u002Fgithub.com\u002Firon\u002Fparams)\n\nBoth:\n\n- [Shared Memory (also used for Plugin configuration)](https:\u002F\u002Fgithub.com\u002Firon\u002Fpersistent)\n- [Sessions](https:\u002F\u002Fgithub.com\u002Firon\u002Firon-sessionstorage)\n\nThis allows for extremely flexible and powerful setups and allows nearly all\nof Iron's features to be swappable - you can even change the middleware\nresolution algorithm by swapping in your own `Chain`.\n\n\\* Due to the rapidly evolving state of the Rust ecosystem, not everything\nbuilds all the time. Please be patient and file issues for breaking builds,\nwe're doing our best.\n\n## Underlying HTTP Implementation\n\nIron is based on and uses [`hyper`](https:\u002F\u002Fgithub.com\u002Fhyperium\u002Fhyper) as its\nHTTP implementation, and lifts several types from it, including its header\nrepresentation, status, and other core HTTP types. It is usually unnecessary to\nuse `hyper` directly when using Iron, since Iron provides a facade over\n`hyper`'s core facilities, but it is sometimes necessary to depend on it as\nwell.\n\n\u003C!--\nFIXME: expand on when it is necessary to user hyper for serving,\ne.g. when doing HTTPS.\n-->\n\n## Installation\n\nIf you're using `Cargo`, just add Iron to your `Cargo.toml`:\n\n```toml\n[dependencies.iron]\nversion = \"*\"\n```\n\n## [Documentation](https:\u002F\u002Fdocs.rs\u002Firon)\n\nThe documentation is hosted [online](https:\u002F\u002Fdocs.rs\u002Firon) and\nauto-updated with each successful release. You can also use `cargo doc` to\nbuild a local copy.\n\n## [Examples](\u002Fexamples)\n\nCheck out the [examples](\u002Fexamples) directory!\n\nYou can run an individual example using `cargo run --bin example-name` inside\nthe [examples](\u002Fexamples) directory. Note that for benchmarking you should make\nsure to use the `--release` flag, which will cause cargo to compile the entire\ntoolchain with optimizations. Without `--release` you will get truly sad numbers.\n\n## Getting Help\n\nFeel free to ask questions as github issues in this or other related repos.\n\nThe best place to get immediate help is on IRC, on any of these channels on the\nmozilla network:\n\n- `#rust-webdev`\n- `#iron`\n- `#rust`\n\nOne of the maintainers or contributors is usually around and can probably help.\nWe encourage you to stop by and say hi and tell us what you're using Iron for,\neven if you don't have any questions. It's invaluable to hear feedback from users\nand always nice to hear if someone is using the framework we've worked on.\n\n## Maintainers\n\nJonathan Reem ([reem](https:\u002F\u002Fgithub.com\u002Freem)) is the core maintainer and\nauthor of Iron.\n\nCommit Distribution (as of `8e55759`):\n\n```\nJonathan Reem (415)\nZach Pomerantz (123)\nMichael Sproul (9)\nPatrick Tran (5)\nCorey Richardson (4)\nBryce Fisher-Fleig (3)\nBarosl Lee (2)\nChristoph Burgdorf (2)\nda4c30ff (2)\narathunku (1)\nCengiz Can (1)\nDarayus (1)\nEduardo Bautista (1)\nMehdi Avdi (1)\nMichael Sierks (1)\nNerijus Arlauskas (1)\nSuprDewd (1)\n```\n\n## License\n\nMIT\n","Iron 是一个用于 Rust 的可扩展并发 Web 框架。它基于 hyper 构建，充分利用了 Rust 语言的类型系统和所有权模型，在单线程或多线程环境中都能保持高效。Iron 的设计注重并发处理能力，能够通过负载均衡或增加线程数实现横向扩展，同时避免了核心框架中的共享写入和锁竞争问题，确保了高并发场景下的性能。此外，Iron 完全使用安全代码编写，不包含任何不安全操作。该框架适合需要高性能、高并发处理能力的 Web 应用开发场景，如微服务架构、API 服务等。通过插件和中间件机制，Iron 提供了灵活的扩展性，使得开发者可以轻松地为应用添加新功能。","2026-06-11 03:04:27","top_language"]