Fruit is a modern dependency-injection framework for C++ that brings type-safe, compile-time-checked wiring to large codebases. Instead of relying on runtime string keys or service locators, bindings are expressed with templates and policy objects that the compiler verifies. It supports constructor injection, assisted injection for factory patterns, scoping (singleton vs. per-request), and provider chains while keeping overhead minimal. Modules declare provided interfaces and requirements, and the injector ensures the whole graph is complete before you ship, eliminating many runtime surprises. Because bindings are ordinary C++ code, they integrate naturally with headers, visibility rules, and link-time optimization. Fruit’s design aims to deliver the ergonomics of DI frameworks from managed languages while staying faithful to C++ performance and compile-time guarantees.

Features

  • Compile-time validated bindings with strong C++ typing
  • Constructor and assisted injection with factories
  • Scopes and providers for lifecycle control
  • Modular components with explicit requirements and exports
  • Minimal runtime overhead and good LTO friendliness
  • Clear error messages for missing or conflicting bindings

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

Apache License V2.0

Follow Fruit

Fruit Web Site

Other Useful Business Software
The Most Powerful Software Platform for EHSQ and ESG Management Icon
The Most Powerful Software Platform for EHSQ and ESG Management

Addresses the needs of small businesses and large global organizations with thousands of users in multiple locations.

Choose from a complete set of software solutions across EHSQ that address all aspects of top performing Environmental, Health and Safety, and Quality management programs.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Fruit!

Additional Project Details

Programming Language

C++

Related Categories

C++ Frameworks

Registered

2025-10-10