Skip to content

Releases: StudioLE/di

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 16 May 11:56
004ca84

Changes

New Features

provider: Add `expect` and `expect_init` panicking convenience methods 004ca84
  • expect::<T>(), expect_async::<T>(), expect_trait::<T>(), expect_trait_async::<T>() resolve or panic
  • expect_init() runs init closures or panics
  • Update tests to use new convenience methods

Warning

Breaking Change: provider: Make `ServiceProvider::init` chainable e3b84ea
  • init(self) -> Result<Self, Report<InitError>> consumes and returns provider
  • Enables build().init()? fluent pattern

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 11 May 20:01
7988112

Changes

Dependencies

Update dependencies 7988112
  • tokio v1.50.0 -> v1.52.3
  • insta 1.46.3 -> 1.47.2

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 11 May 19:54
4549672

Changes

New Features

Add `Init` trait for post-construction service initialization 4549672
  • Init trait with init(&self, &ServiceProvider) for one-time setup
  • ServiceBuilder::with_init::<T>() registers init closures in order
  • ServiceProvider::init() runs closures; returns AlreadyInitialized on repeat call
  • InitError enum with Init and AlreadyInitialized variants

Refactor

Route macro-generated paths through `prelude` module f0cdde2
  • Generated impls now reference ::studiole_di::prelude:: instead of ::studiole_di::
  • Remove redundant root-level re-exports from lib.rs

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 30 Mar 13:54
b7f4c2d

Changes

New Features

Support `Arc` fields in derive macros b7f4c2d
  • Auto-detect trait object fields and generate get_trait() / get_trait_async() calls
  • Add extra-traits feature to syn for Debug on syn::Type

Code Style

Suppress dead code warnings for async-only fields in Registration cbbe35b

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 25 Mar 13:23
cee6bd2

Changes

New Features

Warning

Breaking Change: Complete rewrite to support sync and async constructors, resolve by type or trait, and singleton or transient scopes cee6bd2
  • Replace async Service trait with sync FromServices and async FromServicesAsync
  • Add ServiceBuilder with singleton/transient scope via with_type/with_type_transient
  • Add trait object resolution via Unsize coercion behind traits feature (nightly)
  • Add async feature for FromServicesAsync, get_async, and get_trait_async
  • Rewrite di-macros with #[derive(FromServices)], #[derive(FromServicesAsync)], and #[di(default)]
  • Add migration guide, updated README, and rust-toolchain.toml

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 21 Mar 09:56
79a4a61

Changes

Dependencies

Update dependencies and loosen studiole-report version constraint 79a4a61

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 20 Mar 15:15
cfeab8f

Changes

New Features

Add studiole-di and studiole-di-macros crates cfeab8f

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Mar 14:58
a3df943

Changes

New Features

Add `studiole-di` and `studiole-di-macros` crates a3df943
  • Async dependency injection container with Service trait and ServiceProvider
  • #[derive(Service)] proc-macro for auto-implementing Service
  • CI/CD workflow, license, and README

v0.0.0

Choose a tag to compare

@StudioLE StudioLE released this 20 Mar 14:50
04d802c
chore: Create repo