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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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