google/fruit

Fruit, a dependency injection framework for C++

C++

1,888

1,351 commits

updated Apr 12, 2026

See the code

README

Test on Linux Test on Windows Test on OS X Coverity Scan Status CII Best Practices

Fruit is a dependency injection framework for C++, loosely inspired by the Guice framework for Java. It uses C++ metaprogramming together with some C++11 features to detect most injection problems at compile-time. It allows to split the implementation code in "components" (aka modules) that can be assembled to form other components. From a component with no requirements it's then possible to create an injector, that provides an instance of the interfaces exposed by the component.

See the wiki for more information, including installation instructions, tutorials and reference documentation.

google/fruit

Fruit, a dependency injection framework for C++

C++

1,888

1,351 commits

updated Apr 12, 2026

See the code

README

Test on Linux Test on Windows Test on OS X Coverity Scan Status CII Best Practices

Fruit is a dependency injection framework for C++, loosely inspired by the Guice framework for Java. It uses C++ metaprogramming together with some C++11 features to detect most injection problems at compile-time. It allows to split the implementation code in "components" (aka modules) that can be assembled to form other components. From a component with no requirements it's then possible to create an injector, that provides an instance of the interfaces exposed by the component.

See the wiki for more information, including installation instructions, tutorials and reference documentation.

Project health

Overall

3.7/10

Maintained

0/10

Code review

1/10
OpenSSF Scorecard

Significant stargazers

Michał Janiszewski

105 followers · starred Jul 2016

Harris Brakmić

243 followers · starred Mar 2017

Francisco Facioni

26 followers · starred Feb 2017

Rageking8

12 followers · starred Jun 2024