๐ Shellder
A lightweight, Spring-inspired Dependency Injection framework for Rust. "A Crab needs its Shell"
โจ Overview
Shellder brings a modular, ergonomic approach to Rust applications by offering:
- ๐ฆ Dependency Injection via
#[component]and#[derive(App)]macros - โ๏ธ Lifecycle Hooks (
startup,run,cleanup) - ๐ ๏ธ Compile-time struct injection
- ๐งต Thread-safe container (
Arc-based) - ๐ง Optional lightweight logger
Built for CLI tools, long-running services, or application backends.
๐ Quick Start
Add Shellder to your project
[]
= "0.2.5"
Example
use Arc;
use ;
;
Running this app will automatically inject dependencies and call hooks in order.
๐งฉ Features in v0.2.5
โ
#[component] macro for auto-registration
โ
#[derive(App)] macro to auto-generate main()
โ
Lifecycle Hooks trait support
โ
Thread-safe singleton container
โ
Optional custom logger
โ
Works without tokio or async runtime
๐ ๏ธ Planned Roadmap
- ๐ Named registration & resolution (
"db", "logger") - ๐งช Test container for mocking dependencies
- ๐งฌ Config loader (from
.tomlor.yaml) - ๐งฑ Fluent container builder
- ๐งฉ Macro plugins:
#[value],#[config], etc. - ๐งต Async hook support
- ๐ Workspace support & automatic example runner
๐ก Philosophy
Shellder follows a Rust-first vision:
- โ Strong compile-time guarantees
- ๐งผ Minimal runtime dependencies
- ๐ ๏ธ Clean syntax with macros
- ๐ค Integrates well with your architecture
๐ License
Licensed under Apache-2.0.
๐ค Contributing
Bug reports, PRs, and feedback are welcome! Open an issue to discuss enhancements or integrations.
๐ฃ Stay Tuned
Shellder is under active development. Watch the repo for updates on:
- Configuration loading
- DI graphs
- CLI/web framework integrations
- Logging plugins