portaldi
portaldi is a ergonomic, lightweight and compile-time dependency injection (DI) library for Rust.
Features
-
Ergonomic apis for DI.
You can forcus on a target type in most cases without worrying about containers.
di.hello; -
Natively async support.
-
In portaldi, components and trait must be
thread-safe(Sync + Send) -
Asynchronous component creation is enabled.
di .await .hello -
-
DRY support by proc-macros.
Almost boiler codes can be generated by portaldi's proc-macro.
Example
use *;
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.