Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snuk182/indep
An attempt to make a Dependency Injection library in Rust
https://github.com/snuk182/indep
dependency-injection rust
Last synced: about 1 month ago
JSON representation
An attempt to make a Dependency Injection library in Rust
- Host: GitHub
- URL: https://github.com/snuk182/indep
- Owner: snuk182
- License: apache-2.0
- Created: 2016-08-20T15:40:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-25T09:27:13.000Z (about 8 years ago)
- Last Synced: 2024-10-31T11:33:46.311Z (about 2 months ago)
- Topics: dependency-injection, rust
- Language: Rust
- Size: 16.6 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# indep
Dead simple Dependency Injection library in Rust.## Documentation
The library contains support for single- and multi-threaded environments. See examples/sync.rs and examples/async.rs respectively, everything is described there.
Put the following in your `Cargo.toml`:
```toml
[dependencies]
indep = "*"
```And the following - to the crate root:
```rust
#[macro_use]
extern crate indep;
#[macro_use]
extern crate log;
```Also you will need several usage definitions:
```rust
use your_mod::{Dependency,Dependent,Implementation};
```
in DI-enabled trait implementations, where your_mod is module in your project where the pool creation macro is applied.## Dependencies
None except `log`, which is used only to `trace!` dependency injections.
## License
* MIT OR Apache-2.0