diff --git a/.gitignore b/.gitignore index f52679b..a80786c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Cargo.lock build/ target/ .DS_Store +/.hugo_build.lock diff --git a/config.toml b/config.toml index 4bc6f2a..e6e1061 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,6 @@ title = "actix" canonifyURLs = true -googleAnalytics = "UA-110322332-1" +googleAnalytics = "" pygmentsUseClasses = true pygmentsCodeFences = true defaultContentLanguageInSubdir = false @@ -16,7 +16,7 @@ weight = 1 [params] actixVersion = "0.10" -actixWebVersion = "3" -actixRtVersion = "1.1" -actixWebMinRustVersion = "1.42" -actixMinRustVersion = "1.42" +actixWebVersion = "4" +actixRtVersion = "2" +actixWebMinRustVersion = "1.54" +actixMinRustVersion = "1.54" diff --git a/layouts/index.html b/layouts/index.html index 4d08b29..7856907 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -27,42 +27,46 @@ Feature Rich -
Actix provides a lot of features out of box. HTTP/2, logging, etc.
++ Out of the box logging, body compression, static file serving, TLS, HTTP/2, and + much more. +
Easily create your own libraries that any Actix application can use.
+Easily create and share reusable components for any Actix Web application.
Actix is blazingly fast. Don't take our word for it -- Actix Web is blazingly fast. Don't take our word for it -- see for yourself!
- Handler functions in actix can return a wide range of objects that
+ Handler functions in Actix Web can return a wide range of objects that
implement the Responder
trait. This makes it a breeze
to return consistent responses from your APIs.
- Actix comes with a powerful extractor system that extracts data - from the incoming HTTP request and passes it to your view functions. - Not only does this make for a convenient API but it also means that - your view functions can be synchronous code and still benefit - from asynchronous IO handling. + Actix Web comes with a powerful extractor system that extracts parts of the incoming + HTTP request and passes it to your handler functions. +
+
+ A handler function can receive up to 12 arguments that implement the
+ FromRequest
trait, in any order, and Actix Web will automatically extract
+ them from the request and provide them. It feels like magic!
- Handling multipart/urlencoded form data is easy. Just define - a structure that can be deserialized and actix will handle - the rest. + Handling multipart/urlencoded form data is easy. Just define a structure that can be + deserialized and Actix Web will handle the rest.
- {{ highlight `#[derive(Deserialize)] + {{ highlight `use actix_web::web::{Either, Json, Form}; + +#[derive(Deserialize)] struct Register { username: String, country: String, } -async fn register(form: web::Form- An actix app comes with a URL routing system that lets you match on - URLs and invoke individual handlers. For extra flexibility, scopes - can be used. + The built-in Actix Web request router can be used with or without macros attached to + handlers, and always provides flexible and composable methods of creating routing + tables. +
++ Includes support for matching dynamic path segments, path prefix groups, and custom + routing guards which let you define your own rules.
{{ highlight `#[get("/")] async fn index(_req: HttpRequest) -> impl Responder {