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
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
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