# pakrym/jab

C# Source Generator based dependency injection container implementation.

Repository: https://github.com/pakrym/jab
Canonical: https://ross.abutalabs.com/products/jab
Language: C#
License: MIT
License Family: permissive
Topics: singleton-service, dependency-injection, source-generators, roslyn, roslyn-generator, microsoft-extensions
Last push: 2025-09-12T18:00:31+00:00

## Health v2 (maintenance only)
Score: 51/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 41, release rhythm 35, longevity 100
- inputs: {"age_days": 2091, "days_push": 355, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1256, forks 46 (observed 2026-08-28T04:04:08.977583+00:00)

## What it is
Jab is a compile-time dependency injection container for C# implemented as a Roslyn source generator. It generates strongly-typed service provider code during compilation, eliminating runtime reflection and providing fast startup and resolution compared to Microsoft.Extensions.DependencyInjection.

## Use cases
- fast dependency injection for .NET applications
- AOT-friendly DI container without runtime code generation
- compile-time validation of service registrations
- dependency injection for Unity games
- reduce DI container startup time in serverless or CLI apps
- replace Microsoft.Extensions.DependencyInjection with faster alternative

## When to choose
- you need the fastest possible DI container startup and resolution in .NET
- you target AOT or trimming scenarios where reflection-based DI fails
- you want container configuration errors caught at compile time
- you work in Unity or .NET Standard 2.0 environments
- you want zero runtime dependencies in your library

## When to avoid
- you rely on IServiceCollection-based runtime registration syntax
- you need dynamic or runtime-configured service registrations
- your team prefers conventional Microsoft.Extensions.DependencyInjection ecosystem
- you need features beyond transient, singleton, scoped, named, factory, and instance registrations

## Facets
- artifact type: library
- maturity: active
- function: compiler
- domain: developer-tools, performance
- platform: dotnet, cross-platform
- tags: source-generator, roslyn, dependency-injection-container, compile-time-di, aot-friendly, microsoft-extensions, unity-support, nuget-package, dependency-injection, code-generation, dotnet

## Member repositories
- pakrym/jab (main) score 51

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:08.977583+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:07:17.077573+00:00, confidence not recorded.
  - readme: https://github.com/pakrym/jab (fetched 2026-08-28T04:04:08.977583+00:00, sha c6ab5af03ed0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
