Actix web is a simple, pragmatic and extremely fast web framework for Rust
- User Guide
- API Documentation (Development)
- API Documentation (Releases)
- Chat on gitter
- Cargo package: actix-web
- Minimum supported Rust version: 1.26 or later
extern crate actix_web2;
use actix_web2::{Path, Responder};
fn index(info: Path<(u32, String)>) -> impl Responder {
format!("Hello {}! id:{}", info.1, info.0)
}
fn main() {
server::new(
|| App::new()
.route("/{id}/{name}/index.html", http::Method::GET, index))
.bind("127.0.0.1:8080").unwrap()
.run();
}
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.