1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00
actix-web/README.md
2017-12-30 16:50:17 +01:00

3.4 KiB

Actix web Build Status Build status codecov crates.io Join the chat at https://gitter.im/actix/actix

Actix web is a small, fast, down-to-earth, open source rust web framework.

use actix_web::*;

fn index(req: HttpRequest) -> String {
    format!("Hello {}!", &req.match_info()["name"])
}

fn main() {
    HttpServer::new(
        || Application::new()
            .resource("/{name}", |r| r.f(index)))
        .bind("127.0.0.1:8080")?
        .start();
}

Documentation

Features

  • Supported HTTP/1.x and HTTP/2.0 protocols
  • Streaming and pipelining
  • Keep-alive and slow requests handling
  • WebSockets
  • Transparent content compression/decompression (br, gzip, deflate)
  • Configurable request routing
  • Graceful server shutdown
  • Multipart streams
  • Middlewares (Logger, Session, DefaultHeaders)
  • Built on top of Actix.

Benchmarks

Some basic benchmarks could be found in this respository.

Examples

License

This project is licensed under either of

at your option.

Analytics