Show HN: Rust Web Framework

Show HN: Rust Web Framework

Rwf ‐ Rust Web Framework

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.

Documentation

πŸ“˜ The documentation is available here.

Features overview

Intricate steel lattice structure showcasing modern geometric industrial design.
Photo: Vadim Timayev / Pexels

Quick start

AdvertisementDon't Outlive Your Benefits β€” Long-Term Care insurance with unlimited LTC funds for as long as you live. Call 1-800-317-0625

To add Rwf to your stack, create a Rust binary application and add rwf and tokio to your dependencies:

AdvertisementDon't Outlive Your Benefits β€” Long-Term Care insurance with unlimited LTC funds for as long as you live. Call 1-800-317-0625

cargo add rwf
cargo add tokio@1 --features full

Building an app is then as simple as:

Detailed view of industrial laboratory equipment showcasing modern design and functionality.
Photo: Jo McNamara / Pexels
use rwf::prelude::*;
use rwf::http::Server;

#[derive(Default)]
struct IndexController;

#[async_trait]
impl Controller for IndexController {
    async fn handle(&self, request: &Request) -> Result<Response, Error> {
        Ok(Response::new().html("

Hey Rwf!

"
)) } } #[tokio::main] async fn main() { Server::new(vec![ route!("/" => IndexController), ]) .launch("0.0.0.0:8000") .await .unwrap(); }

Examples

AdvertisementDon't Outlive Your Benefits β€” Long-Term Care insurance with unlimited LTC funds for as long as you live. Call 1-800-317-0625

See examples for common use cases.

AdvertisementDon't Outlive Your Benefits β€” Long-Term Care insurance with unlimited LTC funds for as long as you live. Call 1-800-317-0625

🚧 Status 🚧

Rwf is in early development and not ready for production. Many features and documentation are incomplete. 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.

Read More

Join the conversation

Your email address will not be published. Be respectful — keep it constructive.

AdvertisementDon't Outlive Your Benefits β€” Long-Term Care insurance with unlimited LTC funds for as long as you live. Call 1-800-317-0625
AdvertisementDon't Outlive Your Benefits β€” Long-Term Care insurance with unlimited LTC funds for as long as you live. Call 1-800-317-0625