Rwf is a comprehensive framework for building web applications in Rust. Written using the classic MVC pattern (model-view-controller), Rwf comes standard with everything you need to easily build fast and secure web apps.
π The documentation is available here.
- β HTTP server
- β User-friendly ORM to build PostgreSQL queries easily
- β Dynamic templates
- β Authentication & built-in user sessions
- β Middleware
- β Background jobs and scheduled jobs
- β Database migrations
- β Built-in REST framework with JSON serialization
- β WebSockets support
- β Static files hosting
- β Tight integration with Hotwired Turbo for building backend-driven SPAs
- β Environment-specific configuration
- β Logging and metrics
- β CLI
- β WSGI server for migrating from Django/Flask apps
- β Rack server for migrating from Rails
To add Rwf to your stack, create a Rust binary application and add rwf
to your dependencies:
cargo add rwf
Building an app is then as simple as:
use rwf::prelude::*;
use rwf::http::Server;
#[controller]
async fn index() -> Response {
Response::new().html("<h1>Welcome to Rwf!</h1>")
}
#[tokio::main]
async fn main() {
Server::new(vec![
route!("/" => index),
])
.launch()
.await
.unwrap();
}
See examples for common use cases.
Rwf is in beta and looking for early adopters. Most features are in a good state and documentation is usable.
Contributions are welcome. Please see CONTRIBUTING for guidelines, ARCHITECTURE for a tour of the code, and ROADMAP for a non-exhaustive list of desired features.