๐ฅ Ignitia
A blazing fast, lightweight web framework for Rust that ignites your development journey.
Embodies the spirit of Aarambh (new beginnings) - the spark that ignites your web development journey
Built with โค๏ธ by Aarambh Dev Hub
โก Why Ignitia?
Ignitia embodies the spirit of Aarambh (new beginnings) - the spark that ignites your web development journey. Built for developers who demand speed, simplicity, and power with modern protocol support.
- ๐ Multi-Protocol: HTTP/1.1, HTTP/2, and HTTPS with automatic protocol negotiation
- โก Industry-Leading Performance: 18,367+ RPS - faster than Axum, matches Actix-web
- ๐ TLS/HTTPS: Built-in TLS support with ALPN and self-signed certificates for development
- ๐ชถ Lightweight: Minimal overhead, maximum efficiency
- ๐ฅ Powerful: Advanced routing, middleware, and WebSocket support
- ๐ฏ Developer-First: Clean, intuitive, and productive APIs
- ๐ก๏ธ Secure: Built-in security features and best practices
- ๐ช Cookie Management: Full-featured cookie handling with security attributes
- ๐ WebSocket Ready: First-class WebSocket support with optimized performance
- ๐ Type-Safe Extractors: Path, Query, JSON, Form, Multipart, State, and custom extractors
- ๐ Multipart Support: Advanced file uploads with metadata extraction
๐ Table of Contents
- Installation
- Quick Start
- Performance
- Core Features
- HTTP/2 & HTTPS
- WebSocket Support
- Extractors
- State Management
- Form Handling
- File Uploads & Multipart
- Routing
- Middleware
- CORS Configuration
- Cookie Management
- Authentication
- Examples
- Documentation
- API Reference
- Contributing
๐ Documentation
Ignitia comes with comprehensive documentation to help you get started quickly and master advanced features:
doc/
โโโ ๐ README.md # This file - overview and quick start
โโโ ๐ QUICK_START.md # 5-minute setup guide
โโโ ๐ INSTALLATION.md # Detailed installation instructions
โโโ ๐ ROUTING_GUIDE.md # Advanced routing patterns
โโโ ๐ MIDDLEWARE_GUIDE.md # Custom middleware development
โโโ ๐ ERROR_HANDLING.md # Error handling patterns
โโโ ๐ EXTRACTORS.md # Type-safe request extraction
โโโ ๐ WEB_SOCKETS.md # WebSocket implementation guide
โโโ ๐ FILE_UPLOADS.md # File upload and multipart handling
โโโ ๐ SERVER_CONFIG.md # Server configuration options
โโโ ๐ SECURITY.md # Security best practices
โโโ ๐ API_REFERENCE.md # API reference documentation
โโโ ๐ REQUESTS.md # Request handling patterns
โโโ ๐ RESPONSES.md # Response handling patterns
โโโ ๐ STATIC_FILES.md # Serving static files
โโโ ๐ MIGRATION.md # Migration from other frameworks
โโโ ๐ CONTRIBUTING.md # How to contribute
โโโ ๐ CHANGELOG.md # Version history
โโโ ๐ EXAMPLES.md # Comprehensive examples
๐ Quick Links:
- ๐ Quick Start Guide - Get up and running in 5 minutes
- โก Performance Guide - Optimize for maximum speed
- ๐ Security Guide - Secure your applications
- ๐ WebSocket Guide - Real-time communication
- ๐ File Upload Guide - Handle file uploads
- ๐ฃ๏ธ Routing Guide - Advanced routing patterns
- ๐ง Middleware Guide - Custom middleware development
๐ ๏ธ Installation
Add Ignitia to your Cargo.toml:
[]
= { = "0.2.2", = ["tls", "websocket", "self-signed"] }
= { = "1.40", = ["full"] }
= { = "1.0", = ["derive"] }
= "1.0"
= "0.3"
Feature Flags
tls: Enables HTTPS/TLS support with certificate management and ALPNwebsocket: Enables WebSocket protocol support with connection managementself-signed: Enables self-signed certificate generation (development only)
๐ Quick Start
Basic High-Performance Server
use ;
use ;
async
// Handler with state access
async
// Path parameter extraction
async
// JSON body handling
async
// Form data handling
async
// File upload handling
async
// Profile with file upload
async
// Health check with state
async
๐ Performance & Benchmarks
๐ Industry-Leading Performance
Ignitia delivers exceptional performance that outperforms popular frameworks:
๐ COMPREHENSIVE BENCHMARK RESULTS
--------------------------------------------------
๐ฅ Ignitia Framework
Average RPS: 18,367.7 (+185% vs Axum)
Peak RPS: 24,014.1 (Near Actix-web peak)
Average Response Time: 13.34ms (45% faster than Axum)
Best Response Time: 0.14ms (48% faster than Axum)
Failed Requests: 0 (100% reliability)
๐ฅ Actix-web
Average RPS: 17,792.7
Peak RPS: 24,296.3
Average Response Time: 14.06ms
Best Response Time: 0.18ms
Failed Requests: 0
๐ฅ Axum
Average RPS: 6,437.3
Peak RPS: 9,331.4
Average Response Time: 24.42ms
Best Response Time: 0.27ms
Failed Requests: 0
โก Performance Features
// Zero-copy request processing
async
// HTTP/2 multiplexing advantage
let config = ServerConfig ;
๐ฅ Why Ignitia is Faster
- ๐ง Compiled Router: Zero-allocation route matching with
ArcSwap - โก Efficient Extractors: Minimal overhead type-safe parameter extraction
- ๐ Smart Middleware: Pipeline optimization without boxing overhead
- ๐ฆ Memory Optimized: Careful use of
Arc<T>andRwLockfor shared state - ๐ฏ Direct Dispatch: Minimal abstraction layers between request and handler
๐ฅ Core Features
๐ HTTP/2 & HTTPS Support
Ignitia provides comprehensive support for modern HTTP protocols with automatic negotiation:
Production HTTPS Configuration
use ;
let router = new
.get;
// Production TLS setup
let tls_config = new
.with_alpn_protocols // HTTP/2 priority
.tls_versions
.enable_client_cert_verification;
new
.tls
.run
.await
Development with Self-Signed Certificates
// Quick HTTPS setup for development
new
.self_signed_cert // โ ๏ธ Development only!
.run
.await
H2C (HTTP/2 Cleartext) Support
let config = ServerConfig ;
// Test with: curl --http2-prior-knowledge http://localhost:8080/
๐ WebSocket Support
First-class WebSocket implementation with optimized performance:
use ;
use ;
let router = new
// Simple echo server
.websocket
// Advanced JSON chat
.websocket;
๐ฏ Type-Safe Extractors
Ignitia provides powerful, type-safe extractors for handling various parts of HTTP requests:
Available Extractors
use ;
use Deserialize;
// Multiple extractors in one handler
async
๐๏ธ State Management
Ignitia provides powerful state management for sharing data across handlers:
Application State Setup
use ;
use Arc;
async
// Handlers can access state
async
async
// Multiple state types
async
๐งช Testing
# Run all tests
# Test with features
# Integration tests
# Performance benchmarks
Testing Your API
# HTTP/1.1
# HTTP/2
# HTTPS/HTTP2
# WebSocket
# Form data
# File upload
# Multiple file upload
# Mixed form with file
๐ค Contributing
We welcome contributions! Here's how you can help:
Development Setup
# Clone repository
# Install dependencies
# Run tests
# Run examples
Guidelines
- Code Quality: Run
cargo fmtandcargo clippy - Tests: Add tests for new features
- Documentation: Update docs and examples
- Performance: Benchmark performance-critical changes
- Compatibility: Maintain backwards compatibility
๐ Changelog
v0.2.2 - Performance Champion Release ๐
๐ Industry-Leading Performance
- โ 18,367+ RPS: Outperforms Axum by 185%, matches Actix-web
- โ Sub-millisecond responses: 0.14ms best response time
- โ Zero failures: 100% reliability across all benchmarks
- โ HTTP/2 optimization: Enhanced multiplexing and connection handling
๐ New Features
- โ
State Management: Type-safe shared application state with
State<T> - โ
Form Handling: Comprehensive form data extraction with
Form<T> - โ
Multipart Support: Advanced file uploads with
Multipartextractor - โ Enhanced Extractors: More powerful parameter extraction
- โ HTTP/2 Support: Full HTTP/2 implementation with ALPN negotiation
- โ TLS/HTTPS: Comprehensive TLS support with certificate management
- โ Advanced CORS: Regex origin matching and credential support
- โ Enhanced WebSocket: Optimized WebSocket with batch processing
๐ Security & Reliability
- โ TLS 1.2/1.3: Modern TLS support with ALPN
- โ Secure Cookies: Full security attribute support
- โ CORS Protection: Advanced cross-origin controls
- โ Input Validation: Type-safe parameter extraction and validation
- โ File Upload Security: Content type validation and size limits
๐ฏ Developer Experience
- โ Better Documentation: Comprehensive examples and guides
- โ Error Messages: Improved error handling and debugging
- โ Type Safety: Enhanced compile-time guarantees
- โ Easy Setup: Simplified configuration and deployment
- โ File Handling: Streaming uploads for large files
๐ License
MIT License - see LICENSE for details.
โ Support & Community
If you find Ignitia helpful, consider supporting the project:
๐ Get Started Today
# Create new project
&&
# Add Ignitia with all features
# Create your first high-performance app
Join thousands of developers building the future with Ignitia
๐ฅ Ignitia. Build Fast. Scale Faster. ๐ฅ
Built with โค๏ธ by Aarambh Dev Hub
Where every line of code ignites possibilities.