v0.23.0
0.23.0
Major pivot! Until now, Nakago has been aimed at growing into a full-scale API server framework. However, I've realized that the core value of Nakago is the Dependency Injection system, and that it can be used in a wide variety of contexts. This release is a pivot to focus on the DI system itself, and to make it more flexible and easier to use in a variety of contexts.
Take a look at examples like the Axum / Async-GraphQL demo for more details!
Removed
nakago
- RemovedApplication
,Hooks
, thelifecycle::EventType
andlifecycle::Events
enums. Theconfig
utilities were moved tonakago-figment
.nakago-axum
- RemovedAxumApplication
,Route
, andRoutes
in favor of a more generic approach. Use the newInject
extractor to access dependencies in your Axum handlers.nakago-warp
- RemovedWarpApplication
,Route
, andRoutes
in favor of a more generic approach. Use thewith_injection()
Filter to access dependencies in your Warp handlers.
Changed
nakago
- The tag-based container operations were previously the default mode of working withInject
. This proved to be more verbose and than necessary in most cases, however. The new default mode is to use the type-based operations, which are more ergonomic and easier to use. The tag-based operations are still available, but they are now suffixed with_tag
to make it clear that they are a different mode of operation. The type-based operations are no longer suffixed with_type
, because they are now the default.nakago
- Theinject
namespace has been promoted to the top level. Wherenakago::inject
was used before,nakago
should now be the equivalent.nakago
- Theconfig
utilities were moved tonakago-figment
.nakago-examples-simple
,nakago-examples-async-graphql
,nakago-examples-simple-warp
- Updated with the new approach. See these examples for more information about how to use the tools mentioned above.
Added
nakago-axum
- Added a newInject
extractor to access dependencies in your Axum handlers. This is a much more idiomatic way to use Nakago with Axum, and it's more flexible than the previous approach. Use the provided AxumState
to make theInject
container available to your handlers.nakago-figment
- Generic config utilities extracted from the corenakago
package.