Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google/fruit
Fruit, a dependency injection framework for C++
https://github.com/google/fruit
Last synced: 28 days ago
JSON representation
Fruit, a dependency injection framework for C++
- Host: GitHub
- URL: https://github.com/google/fruit
- Owner: google
- License: apache-2.0
- Created: 2014-06-16T20:43:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-07-20T17:57:48.000Z (4 months ago)
- Last Synced: 2024-10-01T16:21:48.075Z (about 1 month ago)
- Language: C++
- Homepage: https://github.com/google/fruit/wiki
- Size: 3 MB
- Stars: 1,803
- Watchers: 88
- Forks: 199
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: COPYING
Awesome Lists containing this project
- awesome-bazel - Fruit
README
[![Test on Linux](https://github.com/google/fruit/actions/workflows/test-on-linux.yml/badge.svg?branch=master)](https://github.com/google/fruit/actions/workflows/test-on-linux.yml)
[![Test on Windows](https://github.com/google/fruit/actions/workflows/test-on-windows.yml/badge.svg?branch=master)](https://github.com/google/fruit/actions/workflows/test-on-windows.yml)
[![Test on OS X](https://github.com/google/fruit/actions/workflows/test-on-osx.yml/badge.svg?branch=master)](https://github.com/google/fruit/actions/workflows/test-on-osx.yml)
[![Coverity Scan Status](https://img.shields.io/coverity/scan/8486.svg?label=Coverity%20scan)](https://scan.coverity.com/projects/google-fruit)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/1040/badge)](https://bestpractices.coreinfrastructure.org/projects/1040)Fruit is a [dependency injection](http://en.wikipedia.org/wiki/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](https://github.com/google/fruit/wiki) for more information, including installation instructions, tutorials and reference documentation.