# hadashiA/VContainer

The extra fast, minimum code size, GC-free DI (Dependency Injection) library running on Unity Game Engine.

Repository: https://github.com/hadashiA/VContainer
Canonical: https://ross.abutalabs.com/products/vcontainer
Homepage: https://vcontainer.hadashikick.jp
Language: C#
License: MIT
License Family: permissive
Topics: di, dependency-injection, unity, unity3d
Last push: 2026-07-01T01:24:27+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 91, longevity 100
- inputs: {"age_days": 2283, "days_push": 64, "days_rel": 63, "gap_med": 30.0, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3042, forks 266 (observed 2026-08-28T04:07:39.373673+00:00)

## What it is
VContainer is a fast, GC-allocation-free dependency injection (DI) container library for the Unity Game Engine, written in C#. It offers constructor/method/property injection, flexible lifetime scoping, plain C# entry points via Unity's PlayerLoopSystem, and integrations with UniTask, UniRx, MessagePipe, and Unity ECS.

## Use cases
- set up dependency injection in a Unity game project
- replace Zenject with a faster DI container for Unity
- decouple domain logic from MonoBehaviour in Unity
- inject dependencies into plain C# classes with Unity player loop scheduling
- manage nested lifetime scopes for scenes and async flows
- use async entry points with UniTask in Unity
- inject dependencies into Unity ECS systems

## When to choose
- you are building a Unity game or app and want fast, allocation-free DI
- you need plain C# entry points instead of MonoBehaviour-heavy control flow
- performance and GC pressure matter (e.g., mobile or VR titles)
- you want flexible nested lifetime scopes tied to scene lifecycles

## When to avoid
- your project is not Unity-based (use a general .NET DI container instead)
- you need a DI container for server-side or non-game .NET applications
- you rely on features VContainer deliberately omits to keep the API simple

## Facets
- artifact type: library
- maturity: active
- function: middleware, developer-tools
- domain: developer-tools, cross-platform
- platform: game-engine, cross-platform
- tags: unity, dependency-injection, ioc-container, gc-free, performance, csharp, unitask, ecs, game-development

## Member repositories
- hadashiA/VContainer (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:39.373673+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-30T07:29:13.578192+00:00, confidence not recorded.
  - readme: https://github.com/hadashiA/VContainer (fetched 2026-08-28T04:07:39.373673+00:00, sha 7473436ec5cb)
  - homepage: https://vcontainer.hadashikick.jp (fetched 2026-08-29T09:44:24.453246+00:00, sha 2d1ab8efd493)
  - site_page: https://vcontainer.hadashikick.jp/getting-started/installation (fetched 2026-08-29T09:44:24.462354+00:00, sha 8801020236f2)
  - site_page: https://vcontainer.hadashikick.jp/about/what-is-di (fetched 2026-08-29T09:44:24.464312+00:00, sha 998fd30bd0f8)
  - site_page: https://vcontainer.hadashikick.jp/getting-started/hello-world (fetched 2026-08-29T09:44:24.466090+00:00, sha 06deb47ffb9a)
  - site_page: https://vcontainer.hadashikick.jp/integrations/entrypoint (fetched 2026-08-29T09:44:24.467965+00:00, sha 3a2ebdcb7898)
  - site_page: https://vcontainer.hadashikick.jp/integrations/unitask (fetched 2026-08-29T09:44:24.469787+00:00, sha 3a824dbbe472)
  - site_page: https://vcontainer.hadashikick.jp/integrations/unirx (fetched 2026-08-29T09:44:24.471630+00:00, sha 9c792397222a)
  - site_page: https://vcontainer.hadashikick.jp/integrations/messagepipe (fetched 2026-08-29T09:44:24.473322+00:00, sha 56d24b2c38af)
  - site_page: https://vcontainer.hadashikick.jp/integrations/ecs (fetched 2026-08-29T09:44:24.474820+00:00, sha 3c2bbd70d0ce)
- Data as of 2026-08-30T08:39:29.467469+00:00.
