• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.cargo/H03-May-2022-109

.github/H03-May-2022-291224

benches/H03-May-2022-291211

docs/graphs/H03-May-2022-12197

examples/H03-May-2022-141115

src/H03-May-2022-21,76314,603

tests/H03-May-2022-1,3611,060

.cargo-checksum.jsonH A D03-May-202289 11

.gitignoreH A D01-Jan-1970251 2217

CHANGES.mdH A D01-Jan-197021.9 KiB773472

CODE_OF_CONDUCT.mdH A D01-Jan-19703.3 KiB5030

Cargo.lockH A D01-Jan-197041.7 KiB1,7411,563

Cargo.tomlH A D01-Jan-19703.8 KiB183139

Cargo.toml.orig-cargoH A D01-Jan-19703.6 KiB148125

LICENSE-APACHEH A D01-Jan-197011.1 KiB202169

LICENSE-MITH A D01-Jan-19701 KiB2622

MIGRATION.mdH A D01-Jan-197018 KiB675470

README.mdH A D01-Jan-19704.2 KiB11085

clippy.tomlH A D01-Jan-197014 21

codecov.ymlH A D01-Jan-1970271 1613

rustfmt.tomlH A D01-Jan-197038 32

README.md

1<div align="center">
2  <h1>Actix Web</h1>
3  <p>
4    <strong>Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust</strong>
5  </p>
6  <p>
7
8[![crates.io](https://img.shields.io/crates/v/actix-web?label=latest)](https://crates.io/crates/actix-web)
9[![Documentation](https://docs.rs/actix-web/badge.svg?version=4.0.0-beta.8)](https://docs.rs/actix-web/4.0.0-beta.8)
10[![Version](https://img.shields.io/badge/rustc-1.46+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html)
11![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-web.svg)
12[![Dependency Status](https://deps.rs/crate/actix-web/4.0.0-beta.8/status.svg)](https://deps.rs/crate/actix-web/4.0.0-beta.8)
13<br />
14[![build status](https://github.com/actix/actix-web/workflows/CI%20%28Linux%29/badge.svg?branch=master&event=push)](https://github.com/actix/actix-web/actions)
15[![codecov](https://codecov.io/gh/actix/actix-web/branch/master/graph/badge.svg)](https://codecov.io/gh/actix/actix-web)
16![downloads](https://img.shields.io/crates/d/actix-web.svg)
17[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)
18
19  </p>
20</div>
21
22## Features
23
24* Supports *HTTP/1.x* and *HTTP/2*
25* Streaming and pipelining
26* Keep-alive and slow requests handling
27* Client/server [WebSockets](https://actix.rs/docs/websockets/) support
28* Transparent content compression/decompression (br, gzip, deflate, zstd)
29* Powerful [request routing](https://actix.rs/docs/url-dispatch/)
30* Multipart streams
31* Static assets
32* SSL support using OpenSSL or Rustls
33* Middlewares ([Logger, Session, CORS, etc](https://actix.rs/docs/middleware/))
34* Includes an async [HTTP client](https://docs.rs/awc/)
35* Runs on stable Rust 1.46+
36
37## Documentation
38
39* [Website & User Guide](https://actix.rs)
40* [Examples Repository](https://github.com/actix/examples)
41* [API Documentation](https://docs.rs/actix-web)
42* [API Documentation (master branch)](https://actix.rs/actix-web/actix_web)
43
44## Example
45
46Dependencies:
47
48```toml
49[dependencies]
50actix-web = "3"
51```
52
53Code:
54
55```rust
56use actix_web::{get, web, App, HttpServer, Responder};
57
58#[get("/{id}/{name}/index.html")]
59async fn index(web::Path((id, name)): web::Path<(u32, String)>) -> impl Responder {
60    format!("Hello {}! id:{}", name, id)
61}
62
63#[actix_web::main]
64async fn main() -> std::io::Result<()> {
65    HttpServer::new(|| App::new().service(index))
66        .bind("127.0.0.1:8080")?
67        .run()
68        .await
69}
70```
71
72### More examples
73
74* [Basic Setup](https://github.com/actix/examples/tree/master/basics/basics/)
75* [Application State](https://github.com/actix/examples/tree/master/basics/state/)
76* [JSON Handling](https://github.com/actix/examples/tree/master/json/json/)
77* [Multipart Streams](https://github.com/actix/examples/tree/master/forms/multipart/)
78* [Diesel Integration](https://github.com/actix/examples/tree/master/database_interactions/diesel/)
79* [r2d2 Integration](https://github.com/actix/examples/tree/master/database_interactions/r2d2/)
80* [Simple WebSocket](https://github.com/actix/examples/tree/master/websockets/websocket/)
81* [Tera Templates](https://github.com/actix/examples/tree/master/template_engines/tera/)
82* [Askama Templates](https://github.com/actix/examples/tree/master/template_engines/askama/)
83* [HTTPS using Rustls](https://github.com/actix/examples/tree/master/security/rustls/)
84* [HTTPS using OpenSSL](https://github.com/actix/examples/tree/master/security/openssl/)
85* [WebSocket Chat](https://github.com/actix/examples/tree/master/websockets/chat/)
86
87You may consider checking out
88[this directory](https://github.com/actix/examples/tree/master/) for more examples.
89
90## Benchmarks
91
92One of the fastest web frameworks available according to the
93[TechEmpower Framework Benchmark](https://www.techempower.com/benchmarks/#section=data-r20&test=composite).
94
95## License
96
97This project is licensed under either of
98
99* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
100  [http://www.apache.org/licenses/LICENSE-2.0])
101* MIT license ([LICENSE-MIT](LICENSE-MIT) or
102  [http://opensource.org/licenses/MIT])
103
104at your option.
105
106## Code of Conduct
107
108Contribution to the actix-web repo is organized under the terms of the Contributor Covenant.
109The Actix team promises to intervene to uphold that code of conduct.
110