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
Stop Cyber Threats with VM-Series Next-Gen Firewall on Azure Icon
Stop Cyber Threats with VM-Series Next-Gen Firewall on Azure

Native application identity and user-based security for your Azure cloud

Gain integrated visibility across all traffic in a single pass. Deploy Palo Alto Networks VM-Series to determine application identity and content while automating security policy updates via rich APIs.
Get a free trial
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