summer-rs is an application framework that emphasizes convention over configuration, inspired by Java's SpringBoot. summer-rs provides an easily extensible plug-in system for integrating excellent projects in the Rust community, such as axum, sqlx, sea-orm, etc.
Compared with SpringBoot in java, summer-rs has higher performance and lower memory usage, allowing you to completely get rid of the bloated JVM and travel light.
Features
- ⚡️ High performance: Benefiting from the awesome rust language, summer-rs has the ultimate performance comparable to C/C++
- 🛡️ High security: Compared to C/C++, the Rust language used by summer-rs provides memory safety and thread safety.
- 🔨 Lightweight: The core code of summer-rs does not exceed 5,000 lines, and the binary size of the release version packaged in rust is also small.
- 🔧 Easy to use: summer-rs provides a clear and concise API and optional Procedural Macros to simplify development.
- 🔌 Highly extensible: summer-rs uses a highly extensible plug-in model, and users can customize plug-ins to extend program capabilities.
- ⚙️ Highly configurable: summer-rs uses toml to configure applications and plug-ins to improve application flexibility.
Example
web
use ;
use ;
use ;
use ;
use Context;
async
async
async
async
job
use Context;
use ;
use ;
use ;
use ;
use ;
async
async
async
async
component macros
Add dependencies to your Cargo.toml:
[]
= "0.4"
= { = "1", = ["full"] }
Simple component registration with #[component] macro:
use component;
use Configurable;
use Config;
use ComponentRegistry;
use App;
use Deserialize;
// Define configuration
// Define component
// Use #[component] macro for automatic registration
async
The #[component] macro eliminates boilerplate code - no need to manually implement the Plugin trait! Learn more →
Supported plugins
| Plugin | Crate | Integrated With | Description |
|---|---|---|---|
summer-web |
axum |
Web framework based on Axum | |
summer-sqlx |
sqlx |
Async SQL access | |
summer-postgres |
rust-postgres |
PostgreSQL client integration | |
summer-sea-orm |
sea-orm |
ORM support | |
summer-redis |
redis |
Redis integration | |
summer-mail |
lettre |
Email sending | |
summer-job |
tokio-cron-scheduler |
Scheduled jobs / Cron | |
summer-stream |
sea-streamer |
Stream processing (Redis Streams / Kafka) | |
summer-opentelemetry |
opentelemetry |
Logging, metrics, and distributed tracing | |
summer-grpc |
tonic |
gRPC services and clients | |
summer-opendal |
opendal |
Unified object storage and data access | |
summer-apalis |
apalis |
High-performance background processing library | |
summer-sa-token |
sa-token-rust |
Sa-Token authentication and authorization |
Ecosystem
summer-sqlx-migration-pluginsummer-lsp- IDE support for VSCode / compatible editor with LSPintellij-summer-rs- IDE support for RustRover / IntelliJ IDEA
Project showcase
Contribution
We also welcome community experts to contribute their own plugins. Contributing →
Help
Click here to view common problems encountered when using summer-rs Help →