shaku 0.6.1

Compile Time Dependency Injection for Rust
Documentation

Shaku is a compile time dependency injection library. It can be used directly or through integration with application frameworks such as Rocket (see shaku_rocket).

Getting started

See the getting started guide

Crate features

By default shaku is thread-safe and exposes macros, but these can be disabled by opting out of the following features:

  • thread_safe: Requires components to be Send + Sync
  • derive: Uses the shaku_derive crate to provide proc-macro derives of Component and Provider, and the module macro.