shaku 0.3.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 derive macros, but these can be disabled by opting out of the following features:

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