An attempt to make a Dependency Injection library in Rust
Clone or download
Latest commit 70bf903 Sep 25, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Merge branch 'master' of https://github.com/snuk182/indep Sep 25, 2016
src Added in-place dependency imports Sep 25, 2016
.gitignore Update .gitignore Sep 25, 2016
Cargo.toml Dual license Sep 25, 2016
LICENSE-APACHE Dual license Sep 25, 2016
LICENSE-MIT Dual license Sep 25, 2016
README.md Update README.md Sep 25, 2016

README.md

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:

[dependencies]
indep = "*"

And the following - to the crate root:

#[macro_use]
extern crate indep;
#[macro_use]
extern crate log;

Also you will need several usage definitions:

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