22 releases (7 stable)

3.0.0-alpha.3 Feb 5, 2024
3.0.0-alpha.2 Sep 4, 2023
3.0.0-alpha.1 Aug 21, 2023
2.2.1 Aug 20, 2023
0.2.0 Nov 4, 2021

#102 in HTTP server

Download history 16/week @ 2024-06-29 28/week @ 2024-07-06 7/week @ 2024-07-13 34/week @ 2024-07-20 152/week @ 2024-07-27 9/week @ 2024-08-03 15/week @ 2024-08-10 5/week @ 2024-08-17 19/week @ 2024-08-24 37/week @ 2024-08-31 21/week @ 2024-09-07 14/week @ 2024-09-14 82/week @ 2024-09-21 49/week @ 2024-09-28 12/week @ 2024-10-05 30/week @ 2024-10-12

174 downloads per month
Used in afire_compress

MIT license

335KB
6K SLoC

🔥 afire Crates.io

THIS IS AN ALPHA RELEASE FOR v3.0.0 – Its probably not the best idea to use this in production and it will definitely have a lot of breaking changes in the future.

afire is a blazingly fast web server micro framework for rust.

💠 Install

Just add the following to your Cargo.toml:

[dependencies]
afire = "3.0.0-alpha.3"

📄 Info

afire is a simple synchronous multithreaded express.js inspired rust web micro framework. wow that was long. It comes with some built extensions in for Static File Serving, Rate limiting, and more.

Below you can find links to some afire related resources.

💥 Example

For more examples see the examples directory here.

Below is a super simple example so you can see the basics of afire syntax.

use afire::prelude::*;

let mut server = Server::<()>::new("localhost", 8080);

server.route(Method::GET, "/greet/{name}", |ctx| {
  let name = ctx.param("name");

  ctx.text(format!("Hello, {}", name))
      .content(Content::TXT)
      .send()?;

  Ok(())
});

server.run().unwrap();

💼 License

afire is licensed under the MIT license so you are free to do basically whatever you want with it as long as you add a copyright notice. You can read the full license text here.

No runtime deps

Features