The async-first dependency injection container for .NET.
Awaiten is a Roslyn source generator that wires your object graph at build time. There is no runtime reflection, the configuration is verified by the compiler (missing, cyclic, ambiguous and lifetime-mismatched registrations are build errors), and the generated code is plain, readable C#.
Its headline differentiator is async initialization: services that need asynchronous setup after construction (opening a connection, handshaking with hardware) are tracked through the graph, and touching an uninitialized instance is a compile error.
[Container]
[Singleton<RealTimeSystem, ITimeSystem>]
[Scoped<StorageService, IStorageService>]
[Transient<OrderService, IOrderService>]
public static partial class AppContainer { }
await using var app = new AppContainer.Root();
await app.InitializeAsync(); // async-initialized services are warmed up
var service = app.Get<IOrderService>();| Package | Description |
|---|---|
Awaiten |
Pure core: attributes, the source generator, and the runtime seams. No third-party dependencies. |
Awaiten.Extensions.DependencyInjection |
Microsoft.Extensions.DependencyInjection interop (ASP.NET Core, generic host, and other containers). |
Early scaffolding. See the design documents for the full specification, the diagnostic catalogue, and integration recipes (ASP.NET Core, WPF, MS.DI, Autofac).
./build.sh # or build.cmd / build.ps1 on WindowsThe build uses NUKE. Targets include compile, unit tests, API checks, code analysis and packaging.
MIT © Valentin Breuß