Cargo Features
dilib has no features set by default.
[dependencies]
dilib = { version = "0.2.2-alpha", features = ["full", "derive", "global", "lazy", "unstable_provide"] }
- default
-
Nothing by default
- full = derive, global, lazy
-
All features excluding unstables
- derive full? = dilib-derive
-
Enables #[derive(Inject)] proc macro
- global full? unstable_provide?
-
Enables global
Container
Affects
dilib::global
… - lazy full? unstable_provide? = once_cell
-
Enables lazy singletons
Affects
shared::late_init
… - unstable_provide = ctor, dilib-macros, global, lazy
-
Enables #[provide(...)] proc macro for global
Container
. This feature is considered unstable becauseRust
does not guarantee that code will always be allowed to executed beforemain
until global constructor get implemented, if ever happen.Affects
global::InjectProvider
,global::PROVIDERS
,dilib::macros
…
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.