# boost-ext/di

C++14 Dependency Injection library

Repository: https://github.com/boost-ext/di
Canonical: https://ross.abutalabs.com/products/di
Homepage: https://boost-ext.github.io/di/
Language: C++
License Family: other
Topics: dependency-injection, design-patterns
Last push: 2026-04-04T00:13:22+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 75, release rhythm 40, longevity 100
- inputs: {"age_days": 5336, "days_push": 152, "days_rel": 518, "gap_med": 0, "n_releases_24m": 2}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1270, forks 150 (observed 2026-08-28T04:04:11.814806+00:00)

## What it is
A single-header C++14 dependency injection library with no external dependencies, part of the Boost.Ext ecosystem. It provides an injector-based API for binding interfaces to implementations and constructing object graphs at compile time.

## Use cases
- dependency injection in C++ projects
- bind interfaces to implementations in C++
- create object graphs without manual wiring
- make C++ code easier to unit test with loosely coupled design
- header-only DI framework with no dependencies
- reduce boilerplate constructor wiring in C++

## When to choose
- you want a lightweight, header-only DI solution in C++14 or later
- you need zero runtime overhead and minimal binary size
- you want to decouple classes for better testability
- you prefer compile-time object graph construction

## When to avoid
- your project targets a C++ standard below C++14
- you need runtime-configurable dependency injection
- you prefer a full framework with extensive module system
- you require a formally licensed Boost library (it's Boost.Ext, not official Boost)

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools, cross-platform
- platform: cpp, cross-platform
- tags: dependency-injection, header-only, c++14, design-patterns, zero-dependencies

## Member repositories
- boost-ext/di (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:11.814806+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:03:25.314129+00:00, confidence not recorded.
  - readme: https://github.com/boost-ext/di (fetched 2026-08-28T04:04:11.814806+00:00, sha f4a3798c1eef)
  - homepage: https://boost-ext.github.io/di/ (fetched 2026-08-29T12:14:47.373981+00:00, sha 117836d61eae)
- Data as of 2026-08-30T08:39:29.467469+00:00.
