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
-
spring-web
: Based onaxum
-
spring-sqlx
: Integrated withsqlx
-
spring-postgres
: Integrated withrust-postgres
-
spring-sea-orm
: Integrated withsea-orm
-
spring-redis
: Integrated withredis
-
spring-mail
: Integrated withlettre
-
spring-job
: Integrated withtokio-cron-scheduler
-
spring-stream
: Integratesea-streamer
to implement message processing such as redis-stream and kafka -
spring-opentelemetry
: Integrate withopentelemetry
to implement full observability of logging, metrics, tracing -
spring-grpc
: Integratetonic
to implement gRPC calls
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 →