r/cpp • n0F4x • Jun 25 '26

C++23 Dependency Injection library with automatic dependency building

I open-sourced my dependency injection library.
Link: https://github.com/n0F4x/redi

This was developed for my game engine.

  • feature-rich dependency configuration
  • optimized for fast compile time
  • helpful error messages when a cyclic dependency is detected
  • dependencies are automatically constructed - no need to register them by hand

I am giving this project to the community so that everybody can benefit. This kind of approach is mostly useful when dealing with intricate systems, such as a plugin system. I welcome all kinds of feedback, as this was mostly a learning opportunity for me. If you'd like to use this in your project but don't have access to the required compiler features, let me know, and I'll see if I can reduce the requirements.

26 Upvotes

47 comments sorted by

View all comments

Show parent comment

10

u/EC36339 Jun 25 '26

Dude, you have never seen the Linux kernel.

-9

u/rahem027 Jun 25 '26

I havent. But as much as I know Linus, he would never allow this bs into linux