spring-rs is an application framework that emphasizes convention over configuration, inspired by Java's SpringBoot. spring-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, spring-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, spring-rs has the ultimate performance comparable to C/C++
- 🛡️ High security: Compared to C/C++, the Rust language used by spring-rs provides memory safety and thread safety.
- 🔨 Lightweight: The core code of spring-rs does not exceed 5,000 lines, and the binary size of the release version packaged in rust is also small.
- 🔧 Easy to use: spring-rs provides a clear and concise API and optional Procedural Macros to simplify development.
- 🔌 Highly extensible: spring-rs uses a highly extensible plug-in model, and users can customize plug-ins to extend program capabilities.
- ⚙️ Highly configurable: spring-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
Supported plugins
| Plugin | Crate | Integrated With | Description |
|---|---|---|---|
spring-web |
axum |
Web framework based on Axum | |
spring-sqlx |
sqlx |
Async SQL access | |
spring-postgres |
rust-postgres |
PostgreSQL client integration | |
spring-sea-orm |
sea-orm |
ORM support | |
spring-redis |
redis |
Redis integration | |
spring-mail |
lettre |
Email sending | |
spring-job |
tokio-cron-scheduler |
Scheduled jobs / Cron | |
spring-stream |
sea-streamer |
Stream processing (Redis Streams / Kafka) | |
spring-opentelemetry |
opentelemetry |
Logging, metrics, and distributed tracing | |
spring-grpc |
tonic |
gRPC services and clients | |
spring-opendal |
opendal |
Unified object storage and data access | |
spring-apalis |
apalis |
High-performance background processing library |
Ecosystem
Project showcase
Contribution
We also welcome community experts to contribute their own plugins. Contributing →
Help
Click here to view common problems encountered when using spring-rs Help →