Oxidite Web Framework
A modern, high-performance web framework for Rust, inspired by FastAPI, Express.js, and Laravel.
Built with โค๏ธ by Meshack Bahati Ouma
๐ What is Oxidite?
Oxidite is a modern, high-performance, developer-first web framework for Rust that provides a Rails-like, batteries-included experience. Built on top of the lightning-fast hyper and tokio asynchronous runtimes, it eliminates boilerplates by providing first-class identity & access management, a fully-featured custom ORM with async validation and eager-loading, a unified cloud/local storage manager, durable background queues, interactive REPL (oxidite tinker), hot-reload dev servers, and beautiful diagnostic pages. Oxidite is designed to provide maximum velocity and system-level performance, without compromising on developer ergonomics.
โจ What's Included
Oxidite provides a complete out-of-the-box toolkit for modern application development:
oxidite-core: High-performance routing, hyper HTTP server, and type-safe extractors (Json,Path,Query,State,Form,Cookies,Body).oxidite-db: Advanced custom ORM featuring async validation rules (length,range,email,url,regex,custom,unique), relationships (has_many,has_one,belongs_to), and auto-diff schema migrations.oxidite-auth: End-to-end Identity & Access Management supporting RBAC/PBAC, API keys, JWT session handling, and OAuth2 integration.oxidite-realtime: Full-duplex WebSockets, Server-Sent Events (SSE), and Redis-backed event broadcasting.oxidite-queue: Durable background job execution with automatic retries and dead-letter queues.oxidite-cache: Transparent caching supporting in-memory and Redis backends.oxidite-storage: Unified storage API with local disk and AWS S3/Cloudinary/ImageKit compatibility.oxidite-template: Lightweight server-side rendering (SSR) templates.oxidite-openapi: Automatic Swagger UI/OpenAPI 3.0 document generation.oxidite-cli: Command-line scaffolding, migrations, code generators, andoxidite tinkerinteractive console.
๐๏ธ Our ORM Goal: Parity with SeaORM & Diesel
We designed our built-in ORM to match the ergonomics, power, and safety of the ecosystem's industry-standard libraries like SeaORM and Diesel:
- Compile-Time Checks: Using our procedural macros and
handler_fnroute helper, handler extractor bindings and model queries are verified at compile time. - Solve the N+1 Problem: Prevents N+1 database queries with static eager-loading helper methods (
eager_load_posts,eager_load_profile) that execute batched SQLINqueries. - Auto-Diff Migrations: Eliminate manually written SQL migration scripts. Oxidite's CLI parses and diffs your Rust struct models against the live database schema to generate migrations automatically.
โก Honest Benchmarks Notice
We currently do not have public benchmarks.
While Oxidite leverages hyper and tokio to achieve very high performance, we prioritised completing the unified framework ecosystem first. Detailed performance profiles (RPS, latency, memory usage) comparing Oxidite against Axum, Actix Web, and Loco will be published in future releases.
Status: See STATUS.md for detailed feature completeness
๐ฆ Installation
Install the Oxidite CLI tool to get started:
# Install from source (recommended for development)
# Or install from crates.io (when published)
๐ Getting Started
Quick Start
Create a new Oxidite project in seconds:
Then run your application:
# Navigate to your project
# Start the development server
Your application will be available at http://127.0.0.1:8080.
Hello World Example
Here's a simple "Hello World" example:
use *;
async
async
Using Extractors
Oxidite provides powerful type-safe extractors for handling different types of requests:
use *;
use Deserialize;
// Handle JSON requests
async
// Handle form data
async
// Handle query parameters
async
// Handle path parameters
async
// Access cookies
async
// Access raw body
async
๐ ๏ธ Core Concepts
Routers and Handlers
Oxidite uses a clean routing system with async handlers:
use *;
async
async
async
Request Handling
Oxidite provides several extractors to handle different types of requests:
- Json: Extracts and deserializes JSON from request body
- Form: Extracts and deserializes form data
- Query: Extracts and deserializes query parameters
- Path: Extracts and deserializes path parameters
- Cookies: Extracts cookies as HashMap
- Body: Extracts raw request body as String
- State: Extracts application state from request extensions
API Versioning
Oxidite supports multiple API versioning strategies:
use *;
// URL-based versioning
async
async
// Version-specific routes
router.get;
router.get;
Error Handling
Oxidite provides comprehensive error handling with appropriate HTTP status codes:
use *;
async
async
async
๐ Documentation
Complete documentation is available in the docs/ directory:
- Getting Started - Your first Oxidite application
- Core Concepts - Fundamental architecture and concepts
- API Documentation - Complete API reference
- Framework Features - Framework features and capabilities
- Added Features - Recently added features and improvements
- Database Guide - ORM and database operations
- Authentication Guide - Authentication and authorization
- Templating Guide - Server-side rendering
- Middleware Guide - Adding functionality with middleware
- CLI Tools - Command-line interface
๐๏ธ Architecture
Oxidite is composed of modular crates that can be used independently:
| Crate | Description |
|---|---|
oxidite |
Main crate with prelude and convenience exports |
oxidite-core |
Core HTTP server, routing, and extractors |
oxidite-db |
Database ORM with migrations and relationships |
oxidite-auth |
Authentication and authorization |
oxidite-template |
Template engine for server-side rendering |
oxidite-middleware |
Common middleware implementations |
oxidite-cli |
Command-line tools for project management |
oxidite-config |
Configuration management |
oxidite-cache |
Caching utilities |
oxidite-queue |
Background job processing |
oxidite-realtime |
Real-time features (WebSockets, SSE) |
oxidite-mail |
Email sending capabilities |
oxidite-storage |
File storage (local and S3) |
oxidite-openapi |
OpenAPI/Swagger integration |
oxidite-macros |
Procedural macros |
oxidite-security |
Security utilities |
oxidite-testing |
Testing utilities |
oxidite-utils |
Common utilities |
๐งช Testing
Oxidite provides comprehensive testing utilities:
use *;
use TestClient;
๐ Deployment
Deploy your Oxidite application with any Rust-compatible hosting provider:
# Build for release
# Run the application
For containerized deployment:
FROM rust:latest
WORKDIR /app
COPY . .
RUN cargo build --release
CMD ["./target/release/my-app"]
๐ค Contributing
Contributions are welcome! Please read our Contributing Guide.
๐ License
MIT License - see LICENSE for details.