A lightweight async dependency injection toolkit for Rust
MIT License
Bot releases are hidden (Show)
Published by bkonkle about 1 year ago
This is a significant checkpoint, achieving fully async-driven operation with lazy Providers that are only executed when their provided Dependency is requested. To facilitate this, each Dependency is now wrapped in an Arc and no mutable references are no longer possible.
Expect major changes to the Application and Lifecycle systems going forward, building on these changes.
inject::Injector
type that encapsulates a new strategy for on-demand Provider execution in an async context.nakago
and nakago-axum
, reflected in the examples/async-graphql
example app. Providers are no longer eagerly executed, they are instead held within the injection container and are the primary way for dependencies to be provided now. When a dependency is requested, the Provider is then invoked and a Shared Future is created in order to share the results with any thread awaiting that dependency.Published by bkonkle about 1 year ago
Init
, Startup
, and Shutdown
lifecycle events, which Hooks can now be attached to in the renamed top-level Application
struct (see below).Route
specifiers to nakago-axum
based on Axum
routes, which are attached to the top-level Router
via nesting.nakago::system::System
to nakago::app::Application
FnvHashMap
because the keys are possibly textual rather than simple integers.HttpApplication
to AxumApplication
to better reflect the specific library used behind the scenes.Application
and AxumApplication
(formerly System
and HttpApplication
) because they aren't needed now.Published by bkonkle over 1 year ago
nakago-axum
crate for HTTP routes (#9)run()
method that starts the server (#9)_type
prefix, and removed the _tag
prefix from the Tag-driven fields. (#9)Published by bkonkle over 1 year ago
Full Changelog: https://github.com/bkonkle/nakago/compare/0.1.0...0.2.0
Published by bkonkle over 1 year ago
The initial release!
Full Changelog: https://github.com/bkonkle/nakago/commits/0.1.0