Sofie
Sofie is a comprehensive, production-ready web framework for Rust that combines simplicity with power. Built on top of VeTiS, it provides everything you need to build modern web applications - from REST APIs to full-featured web services - with a clean, intuitive API that makes development a joy.
Built on top of hyper.
Roadmap
Sofie is continuously evolving! Hereβs what weβre working on:
Security & Authentication
- Authentication - Multiple auth methods (JWT, OAuth, Session)
- Authorization - Role-based access control
- CSRF Protection - Cross-site request forgery prevention
Middleware & Features
- Middleware System - Composable request/response processing
- Rate Limiting - Protect against abuse and DoS attacks
- Sessions - User session management
- CORS - Cross-origin resource sharing support
Real-time & Monitoring
- WebSocket - Real-time bidirectional communication
- Metrics - Application performance monitoring
- Logging - Structured logging integration
- Tracing - Distributed tracing support
AI & Future
- AI Agents - Built-in AI service integration
- Advanced Features - Cutting-edge web technologies
Quick Start
Add to your Cargo.toml:
[dependencies]
sofie = { version = "0.0.9", features = ["http1", "tokio-rt"] }
Basic usage:
use sofie::App;
use http_body_util::{Full};
use bytes::Bytes;
use hyper::Response;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
std_logger::Config::logfmt().init();
let mut app = App::new();
app.serve(|_| async move {
Ok(Response::new(Full::new(Bytes::from("Hello World"))))
}).await?;
Ok(())
}
Examples
Check out the examples for complete examples of how to use Sophia in your projects.
Create project from template
You can create a new project from the template using cargo generate:
cargo generate ararog/sofie-templates
Documentation
License
This project is licensed under the MIT License.
Author
Rogerio Pereira Araujo rogerio.araujo@gmail.com