🦘 A dependency injection container for C++11, C++14 and later

Overview

kangaru 🦘
Build status Build Status BCH compliance Codacy Badge Language grade: C/C++ CII Best Practices Join the chat at https://gitter.im/gracicot/kangaru GitHub license GitHub Releases GitHub Issues Try online

Kangaru is an inversion of control container for C++11, C++14 and later. It provides many features to automate dependency injection and reduce the amount of wiring boilerplate in your code. We are achiving that by exposing in code configuration for autowiring, constructor and function parameters injection. We aim to keep the simplest interface possible and keep boilerplate to a minimum. On top of that, we don't want to be intrusive into user/library code.

Kangaru is a header only library because of it's extensive use of templates. The name kangaru comes from the container's feature to inject itself into a service as a dependency, and because kangaroos are awesome.


Documentation and tutorial is in the wiki and the doc folder!

Looking for the latest stable version? Check out our release page.

Overview

Here's a quick demo to show usage of this library. This is some basic usage of the library with two user classes.

#include <kangaru/kangaru.hpp>
#include <cassert>

// We define some normal classes with dependencies between them
struct Camera {};

struct Scene {
    Camera& camera;
};

// The following is the configuration of our user classes above.
// The structure and dependency graph is defined by these configs.

// Camera is a single service so the service has a shared instance.
// It will be injected and returned as a reference.
struct CameraService : kgr::single_service<Camera> {};

// Scene is not single, so the container return scenes by value.
// Also, we depends on a camera to be constructed.
struct SceneService : kgr::service<Scene, kgr::dependency<CameraService>> {};

int main()
{
    kgr::container container;
    
    // The service function return instances of the normal classes.
    Scene scene = container.service<SceneService>();
    Camera& camera = container.service<CameraService>();
    
    assert(&scene.camera == &camera); // passes, both cameras are the same instance.
}

Try this example online to see how it runs.

Features

  • Non intrusive, no existing classes need modification
  • You tell the container how to construct your types, store and inject them
  • Injection by setters
  • Autowiring by class constructors
  • Function parameter injection
  • Clean and simple API for simple cases, flexible enough for complex cases
  • Low runtime overhead
  • Header only library
  • Clean diagnostics at compile-time

Installation

To make kangaru available on your machine, you must clone the repository and create a build directory:

$ git clone https://github.com/gracicot/kangaru.git && cd kangaru
$ mkdir build && cd build

Then use cmake to generate the makefile and export the package informations:

$ cmake ..

That's it! Link it to your project using cmake and you can already include and code!

Optionally, you can also install kangaru on your system:

$ sudo make install # optional step

Adding Include Path

You must use the find_package function:

find_package(kangaru REQUIRED)

And then add the include dirs to your target:

target_link_libraries(<YOUR TARGET> PUBLIC kangaru)

Then you can include the library as follow:

#include <kangaru/kangaru.hpp>

If you skip the installation, simply tell CMake where to find kangaru:

# in your project build directory
$ cmake .. -DCMAKE_PREFIX_PATH=../../path/to/kangaru/build

Compiler Requirement

Kangaru is tested by our continuous integration with all major compiler versions. The minimum required versions are:

  • MSVC: 2015 update 3 or better
  • GCC: 4.8.5 or better
  • Clang: 3.6 or better
  • AppleClang: 7.0 or better

What's Next

There is some feature I would like to see become real. Here's a list of those, feel free to contribute!

  • Tests for compile-time errors
  • Better messages for compile-time errors (ongoing)
  • Service sources, more detail here: #41
  • Even better performance (ongoing)
  • Expose a zero-overhead interface for cases it can apply
  • Move service definitions to service map.

Got suggestions or questions? Discovered a bug? Please open an issue and we'll gladly respond!

Contributing

To contribute, simply open a pull request or an issue and we'll discuss together about how to make this library even more awesome! See our complete contribution guideline for more details.

Want to help? Pick an issue on our issue tracker!

Found an issue? Have an idea to make this library better? Please submit an issue and we will respond within a few days, and commit to address the needs.

Running Tests

Tests are enabled using the cmake option -DKANGARU_TEST=ON. Enabling this will make our CMake scripts to try finding the Catch2 library. We also contain a submodule for this library in our git repository in case you don't have it available in a prefix directory.

Using this option adds the the test target.

To enable tests specifically designed arount C++14 and C++17 features, there's the -DKANGARU_TEST_CXX14=ON and the -DKANGARU_TEST_CXX17=ON options.

Who's Using Kangaru

Here's a list of projets making use of kangaru

  • Our team's game engine
  • The people I helped integrating this library into their projects
  • Surely more!

Using kangaru?

Let me know of your projects using kangaru! I'll be glad to fill the list above with your project's name.

Acknowledgements

A big thanks to Louis-Alexandre Vallières-Lavoie for reviewing and proposing various improvement to our documentation.

Comments
  • Tagged Services (Accumulate services of abstract type)

    Tagged Services (Accumulate services of abstract type)

    Is your feature request related to a problem? Please describe. I don't know if this is possible already but I'm looking for a way to register an abstract service, then a bunch of concrete services. I then have another service which depends on ALL available concretes of the abstract service.

    Essentially the main service is "pluggable" by creating strategies for it to use.

    Perhaps you have an encryption service which has strategies that can do RSA, or Blowfish. Perhaps you have a sorting service which has strategies that can do quicksort, merge sort, tree sort. Perhaps you have a file meta scanner which has strategies that can scan tags from mp3, flac, ogg.

    Describe the solution you'd like The above are arbitrary examples but hopefully it explains the use case. Sometimes you create a strategy for a service to use which you don't want to have to manually wire every time the service is created, you just want them injected.

    Perhaps when a service has a constructor which has a vector<AbstractStrategyService> strategies the injector could inject all such strategies which have been mapped via kgr::overrides<AbstractStrategyService>.

    Describe alternatives you've considered At the moment it seems like I need to create a strategy factory, then I need to make a factory of factories service, then manually wire those strategy factories with the main factory which gets injected into the real service which uses the strategies.

    Perhaps I'm thinking about this the wrong way or I'm missing a feature that allows this by default.

    Additional context The reason I've called this "tagged services" is because symfony 2 webframework has a DIC where you can "tag" a service as a certain type and have all those services with a given tag injected into another service.

    feature has workaround 
    opened by Kasheen 11
  • Circular dependencies are not detected

    Circular dependencies are not detected

    Circular Dependencies are not detected. My test application crash on a segfault after recursing for ever.

    The best solution would be to return are error at compile time, if not possible at runtime.

    This is my main concern before using kangaru in my professional projects. On complexe service graph, other developer could create circular dependency by mistake, but without any explicit error they may not notice the problem and may not understand that's the reason the application is crashing.

    bug 
    opened by Dragnalith 9
  • Retrieve services by constraints

    Retrieve services by constraints

    Retrieve specific service through constraints (predicates or named) About constraints, by defining a service, one could also define metadata alongside it

    class Shape {
    public:
      virtual const std::string &name() const = 0;
    };
    
    struct ShapeService : kgr::abstract_service<Shape> {
      const std::string &name(const Shape &s) const {
        return s.name();
      }
    };
    

    and then one could do

    container.service<ShapeService>(kgr::constraints<ShapeService>([] (const ShapeService &service) { service.name() == "Square"; };
    

    or by not defining constraints directly in the service

    container.service<ShapeService>(kgr::constraints<ShapeService>([] (const Shape &service) { service.name() == "Square"; };
    

    both technique would work, the first one having the ability to friend the Shape class and not exposing metadata as public api

    Discussion of September 25, 2018 9:06 AM

    feature 
    opened by maxime-jeanson 9
  • Use SBO for single service

    Use SBO for single service

    Right now, we hold all services instances in unique pointers and we always use dynamic allocation. We could use SBO making single services effectively faster and consume less memory.

    enhancement wontfix C++17 
    opened by gracicot 9
  • The state of service map is awful

    The state of service map is awful

    Currently, kangaru suggest users to define the whole service maps. This has the effect of the user needing to "send" the service map to the container and can easily lead to fragmented maps.

    Another problem is that the service map won't follow basic parameter rules like cv qualifier. This needs to be fixed, especially in the version 4.

    feature 
    opened by gracicot 7
  • Get raw or unique ptr from container.service()

    Get raw or unique ptr from container.service()

    Is it possible to receive a unique_ptr or raw pointer from a service() call?

    Something like this:

    Foo *foo = container.service<FooService>();
    std::unique_ptr<Foo> foo = container.service<FooService>();
    

    Or is there any other way to let kangaru create the requested service on the heap?

    question 
    opened by timofurrer 6
  • Improve runtime performance and clang++ compatibility

    Improve runtime performance and clang++ compatibility

    What's new:

    • Add Holder container alias.
    • Less RTTI (better runtime performance):
      • don't use typeid();
      • use static_cast instead of dynamic_cast.
    • Move shared pointers instead of copy (should be faster).
    • Better clang++ compatibility (tested with clang++-3.5).
    opened by Denisss025 6
  • Conan package unavailable

    Conan package unavailable

    Hi! Describe the bug The conan package does not appear to be available to my conan client despite the listing here. It is worth noting that bintray's search didn't find it among the packages, only the repositories. When I open the repository, it lists the package. Kind of weird.

    To Reproduce I've added the conan remote as indicated in the "Set me up" button. I wasn't using authentication though (assumed it was not necessary since this is an open source package - it works that way for other repositories, like bincrafters' conan repository). Then I called conan search *kangaru* and no such package was found.

    Expected behavior conan search kangaru should yield the package information and I should be able to install it as a dependency from bintray.

    Desktop (please complete the following information):

    • OS: Windows
    • Compiler -
    • Version -
    packaging 
    opened by AGreat1 5
  • Support autowiring services

    Support autowiring services

    Automatic configuration from a class constructor would be really nice. We could add a service that tries to construct a class from its constructor parameter.

    feature 
    opened by gracicot 5
  • emplace fails to supply a shared_service

    emplace fails to supply a shared_service

    If I use a shared_service with kgr::supplied to pass some arbitrary values to constructor, when I try to emplace(), I get a compilation error. I thought that shared_service, by inheriting kgr::single, could be used with kgr::supplied.

    opened by giacomocariello 5
  • Supplying an already constructed service via emplace

    Supplying an already constructed service via emplace

    Hi,

    I would like to use the container with services that are generated outside of the container by another system. I would like to avoid having to emplace every new container managed service that has a dependency on an externally managed service. Ideally I would like something that allows me to register into the container and already constructed service that can later be automaticlly injected. In spring this would be something like the registerSingleton method.

    Is this something that is already possible?

    Thanks Andre

    question 
    opened by andreparodi 5
  • Add CodeQL workflow for GitHub code scanning

    Add CodeQL workflow for GitHub code scanning

    Hi gracicot/kangaru!

    This is a one-off automatically generated pull request from LGTM.com :robot:. You might have heard that we’ve integrated LGTM’s underlying CodeQL analysis engine natively into GitHub. The result is GitHub code scanning!

    With LGTM fully integrated into code scanning, we are focused on improving CodeQL within the native GitHub code scanning experience. In order to take advantage of current and future improvements to our analysis capabilities, we suggest you enable code scanning on your repository. Please take a look at our blog post for more information.

    This pull request enables code scanning by adding an auto-generated codeql.yml workflow file for GitHub Actions to your repository — take a look! Whilst we've attempted to make use of the existing configuration that you had on LGTM.com, there may be some differences in environment used to build the project. We hope that in most cases it will not require significant changes to achieve a successful analysis. Check this page for detailed documentation on how to configure a CodeQL workflow.

    Questions? Check out the FAQ below!

    FAQ

    Click here to expand the FAQ section

    How often will the code scanning analysis run?

    By default, code scanning will trigger a scan with the CodeQL engine on the following events:

    • On every pull request — to flag up potential security problems for you to investigate before merging a PR.
    • On every push to your default branch and other protected branches — this keeps the analysis results on your repository’s Security tab up to date.
    • Once a week at a fixed time — to make sure you benefit from the latest updated security analysis even when no code was committed or PRs were opened.

    What will this cost?

    Nothing! The CodeQL engine will run inside GitHub Actions, making use of your unlimited free compute minutes for public repositories.

    What types of problems does CodeQL find?

    The CodeQL engine that powers GitHub code scanning is the exact same engine that powers LGTM.com. The exact set of rules has been tweaked slightly, but you should see almost exactly the same types of alerts as you were used to on LGTM.com: we’ve enabled the security-and-quality query suite for you.

    How do I upgrade my CodeQL engine?

    No need! New versions of the CodeQL analysis are constantly deployed on GitHub.com; your repository will automatically benefit from the most recently released version.

    The analysis doesn’t seem to be working

    If you get an error in GitHub Actions that indicates that CodeQL wasn’t able to analyze your code, please follow the instructions here to debug the analysis.

    How do I disable LGTM.com?

    If you have LGTM’s automatic pull request analysis enabled, then you can follow these steps to disable the LGTM pull request analysis. You don’t actually need to remove your repository from LGTM.com; it will automatically be removed in the next few months as part of the deprecation of LGTM.com (more info here).

    Which source code hosting platforms does code scanning support?

    GitHub code scanning is deeply integrated within GitHub itself. If you’d like to scan source code that is hosted elsewhere, we suggest that you create a mirror of that code on GitHub.

    How do I know this PR is legitimate?

    This PR is filed by the official LGTM.com GitHub App, in line with the deprecation timeline that was announced on the official GitHub Blog. The proposed GitHub Action workflow uses the official open source GitHub CodeQL Action. If you have any other questions or concerns, please join the discussion here in the official GitHub community!

    I have another question / how do I get in touch?

    Please join the discussion here to ask further questions and send us suggestions!

    opened by lgtm-com[bot] 0
  • Path to kangaru 5

    Path to kangaru 5

    Here I simply want to discuss what we want for kangaru 5. There are a few points I want to see in kangaru 5:

    • All services should be possible to define using the service map. Right now, autocall and supplied services can't really be done in a practical manner using the service map definition.
    • The API should prioritize the service map. services defined as a struct should be special cases.
    • C++17
    • The container should be a template. The container "allocator" should be possible to change and allow statically defined finite container to support zero overhead.
    • constexpr containers.
    • Simplification to the injection model, that includes invoke and the construct function.

    I also want a more "conceptified" set of checks. That should also simplify error messages, which simply don't work anymore.

    Now, there are a few points that raises questions:

    • If we go full service map, do we still need the construct function in services?
    • If we go full service map, should we allow simply classes to be used as service in the container instead of the service definition?

    There may be other questions. If you have suggestion or feedback, please write a comment here. I want to gather as much ideas and improvement for the version 5 as possible.

    question 
    opened by gracicot 2
  • Enhance the injection model

    Enhance the injection model

    Is your feature request related to a problem? Please describe. The injection model was not made with autowire and multiple container types. This makes supporting autowire as a no-op to support impossible and would require type erasure for the container service, which may not be ideal.

    Describe the solution you'd like An intermediate step between the contruct function and the service constructor. There could be some hook for the user and generic services to change how the injection should be done.

    Describe alternatives you've considered Supporting noop autowire with conversion operator. Unfortunately, this require C++17 mandatory copy elision and would be really fragile.

    For alternative container types, type erasure would be required. I'm not a fan of this since it might not be inlinable and we block ourself from being zero-overhead.

    enhancement 
    opened by gracicot 0
  • Make autowire easier to use with custom services

    Make autowire easier to use with custom services

    Describe the bug Custom service definition re-implement injection. That's what makes this library so extensive. However, autowire is another mode of injection. It is not really usable with custom service definition.

    To Reproduce Implement a custom service with autowire

    Expected behavior A non intrusive way to support autowire

    Desktop (please complete the following information):

    • All

    Additional context A suggestion would be to make both injection mechanism to work with each other in a more seamless way instead of a new separated one.

    enhancement C++17 
    opened by gracicot 3
  • Compilation performance benchmark (boost::di vs kangaru)

    Compilation performance benchmark (boost::di vs kangaru)

    I am investigation compilation performance, and I have discovered boost::di was way faster than kangaru. Both have a compile time "autowire" feature. The following table compare boost::di with kangaru with and without autowire. I have generated a class graph and services are all kgr::single_service services.

    | Class Count | Kangaru (autowire) | Kangaru (dep) | Boost::di | | ------------| ------------- | ------------- |-----| |4| 1.56s | 1.23s |0.4s | |11| 3.27s |1.65s |0.74s | |26| 7.41s |2.26s |1.22s | |57| 19.93s |3.81s |2.11s | |120| compiler is out of heap space|7.17s | 4.13s |

    We can see Kangaru (autowire) seems to have an exponential complexity where for Boost::di it looks linear. This difference is surprising because even without autowire boost::di is faster. I am also surprise I cannot compile a graph with more than 100 classes.

    I wonder which template black bagic makes this kind of performance difference. If we find it we could use it for kangaru's autowire.

    You can find my test bench it this repository: https://github.com/Dragnalith/di_experiment. The dependency of this gen_test.h matched the 57 class count row.

    help wanted question 
    opened by Dragnalith 5
Releases(v4.3.1)
  • v4.3.1(Aug 15, 2022)

    We're happy to announce that kangaru 4.3.1 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Fixed CI by upgrading to latest actions
    • Added a CMakePresets.json file containing all CMake options
    • Added a namespaced kangaru::kangaru alias in the generated config files
    • Fixed builds with GCC12

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.3.0(Feb 13, 2022)

    Finally after much efforts and time, I'm happy to announce that the version 4.3.0 of kangaru, the C++11 and C++14 dependency injection container has been released!

    For those who are new here, kangaru is an inversion of control container for C++11, C++14 and later. We support features like operation between containers, injection via function parameter, automatic call of member function on instance creation, autowiring and more. Please visit our README and our documentation for more informations.

    It's a library that helps automating the wiring of classes in order to make dependency injection easier and less prone to source breaking changes when refactoring.

    In this version, we added several new features to this library. Here are the highlights:

    • Added a hash based type id, stable between compiler and dlls. Must be activated using -DKANGARU_HASH_TYPE_ID=On #97
    • Prohibited circular dependencies when using kgr::autowire #87
    • Added kgr::optional, an optional type able to handle reference types, intended to be used with service types #72

    Thanks to all of you who reported issues and discussed with us. This has contributed to make this library better and to cover more use cases.

    Feedback and contributions are welcome. Thanks for considering kangaru! 🦘

    Source code(tar.gz)
    Source code(zip)
  • v4.2.5(Feb 13, 2022)

    We're happy to announce that kangaru 4.2.5 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Fixed errors not being displayed even when using kgr::debug #88

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.2.4(May 6, 2020)

    We're happy to announce that kangaru 4.2.4 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Patched an issue that made Visual Studio merge some type ids #96
    • Fixed the version number exposed by CMake

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.1.5(May 6, 2020)

    We're happy to announce that kangaru 4.1.5 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Patched an issue that made Visual Studio merge some type ids #96

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.0.5(May 6, 2020)

    We're happy to announce that kangaru 4.0.5 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Patched an issue that made Visual Studio merge some type ids #96

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.2.3(Mar 15, 2020)

    We're happy to announce that kangaru 4.2.3 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Added a missing include that affect Visual Studio #94

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.2.2(Dec 15, 2019)

    We're happy to announce that kangaru 4.2.2 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • A bug where implementation defined service type id were sent to user defined predicate

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.2.1(Sep 27, 2019)

    We're happy to announce that kangaru 4.2.1 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • A bug that prevented dependencies to abstract classes in some cases #71
    • Some documentation additions, clarifications and fixes

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.2.0(Aug 4, 2019)

    Finally after much efforts and time, I'm happy to announce that the version 4.2.0 of kangaru, the C++11 and C++14 dependency injection container has been released!

    For those who are new here, kangaru is an inversion of control container for C++11, C++14 and later. We support features like operation between containers, injection via function parameter, automatic call of member function on instance creation, autowiring and more. Please visit our README and our documentation for more informations.

    It's a library that helps automating the wiring of classes in order to make dependency injection easier and less prone to source breaking changes when refactoring.

    In this version, we added several new features to this library. Here are the highlights:

    • The order of destruction has been fixed to act more like a stack. #69
    • The container now supports getting a list of all implementers of a polymorphic service. #81
    • Basic runtime benchmark has been added. #73
    • Better service validation when using container.emplace<T>(...) #56
    • Kangaru is now compatible with exception disabled compilation. #70
    • Circular dependencies are now detected and reported when using autowiring #77
    • The service map is now defined in friend functions by built-in service, accelerating compilation.
    • Less memory usage by kgr::type_id<T>()
    • Lots of cleanups

    Thanks to all of you who reported issues and discussed with us. This has contributed to make this library better and to cover more use cases.

    Feedback and contributions are welcome. Thanks for considering kangaru! 🦘

    Source code(tar.gz)
    Source code(zip)
  • v4.1.4(Jul 3, 2019)

    We're happy to announce that kangaru 4.1.4 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Version number not set properly in CMake
    • Wrong order of destruction switch backported, fixing #69
    • Fixed triviality of lazy services with MSVC

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.0.4(Jul 3, 2019)

    Error! Release not found!


    Kidding, we're happy to announce that kangaru 4.0.4 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Added a compile time switch to reverse the order of destruction of services in container, fixes #69

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.1.3(Oct 5, 2018)

    We're happy to announce that kangaru 4.1.3 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Mitigate around Clang regressions

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.1.2(Sep 4, 2018)

    We're happy to announce that kangaru 4.1.2 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Mitigate around Visual Studio 15.8 regressions
    • Minor documentation fixes

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.1.1(Jul 23, 2018)

    We're happy to announce that kangaru 4.1.1 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big features were added.

    Notable things changed in this release are:

    • Simplified operators implementation
    • Workaround "unexpected end of file" errors in visual studio
    • Documentation fixes

    We're always glad to hear your feedback, positive or negative. If this release causes any problems, please open us an issue and we'll respond as promptly as possible!

    Source code(tar.gz)
    Source code(zip)
  • v4.1.0(Jun 28, 2018)

    I'm happy to announce that the version 4.1.0 of kangaru, the C++11 and C++14 dependency injection container has been released!

    For those new here, kangaru is an inversion of control container for C++11, C++14 and later. We support features like operation between containers, injection via function parameter, automatic call of member function on instance creation, autowiring and more. Please visit our README and our documentation for more informations.

    It's a library to automate wiring of classes in order to make dependency injection easier and less prone to source breaking changes when refactoring.

    In this version, we added several new features to this library. Here are the highlights:

    • Autowiring, a new way to automatically deduce dependencies between service classes. #64
    • Reference in generic_service and the addition of kgr::extern_service<T> #63
    • Non-member function in autocall. #34
    • Support for GCC 4.9 and 4.8
    • Indirect mapping, a mechanism used to generate service definition from the service map.
    • Support for Visual Studio's intellisense #54
    • A lot of code cleanups #62
    • An experimental API to enable autowiring on user defined generic services.

    Feedback and contributions are welcome. Thanks for considering kangaru!

    Source code(tar.gz)
    Source code(zip)
  • v4.0.3(Mar 26, 2018)

    We're happy to announce that kangaru 4.0.3 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big feature were added.

    Notable things changed in this release are:

    • Fixed invoke related functionalities in Visual Studio 15.6 #61
    • Various documentation fixes
    Source code(tar.gz)
    Source code(zip)
  • v4.0.2(Feb 7, 2018)

    We're happy to announce that kangaru 4.0.2 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big feature were added.

    Notable things changed in this release are:

    • Fixed kgr::autocall for pointer kgr::shared_service and kgr::unique_service #60
    • Added unit tests to ensure #60 won't happen in future versions.
    Source code(tar.gz)
    Source code(zip)
  • v4.0.1(Jan 19, 2018)

    We're happy to announce that kangaru 4.0.1 is out!

    This is a bugfix release. This version is mostly to fix some unpleasant bugs and various small improvements. No big feature were added.

    Notable things changed in this release are:

    • Fixed emplace() and service() argument forwarding with unique and shared services #59
    • Simplified kgr::detail::injected_wrapper and autocall related functions in the container
    • Various documentation fixes, thank you Louis-Alexandre!
    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(Dec 11, 2017)

    I'm happy to announce that kangaru 4.0.0 is officially out!

    Kangaru is an inversion of control container for C++11 and later. We support features like operation between containers, injection via function parameter, automatic call of member function on instance creation and much more!

    Our goal is to create a container capable of automatic, recusive dependency injection. We also want to do most diagnostics at compile time, while keeping the simplest interface possible. On top of that, we don't want to be intrusive into user/library code.

    For more information, please take our readme a tour!

    A great number of things has changed, and some of those are breaking changes. We still want the transition to be as smooth as possible, so we added a compatibility header that cover most of cases, and a migration guide.

    • A new naming convention has been chose to more closely match STL and Boost #46
    • The old service map support has been removed
    • Documentation has been almost completely rewritten
    • Examples now reflect more closely code snippet found in documentation
    • Compiler requirements have been pushed back to GCC 5.4 and Clang 3.6
    • Added final services #27
    • type_id is now more stable #45
    • Added unit tests and continuous integration #26
    • Single service don't use virtual call anymore, and enable polymorphism only if needed #22
    • Multiple service maps can be sent to the container to map parameter to services #33
    • Autocall can be enabled for any service in a simple manner #36
    • Added supplied services
    • Simplified kgr::generic_service and making custom services

    If you're interested to read more about kangaru, please visit our documentation

    Source code(tar.gz)
    Source code(zip)
  • v3.4.0(Dec 4, 2017)

    I'm happy to announce that Kangaru, the C++11 and C++14 dependency injection container version 3.4.0 is out!

    This may be the last feature version in the 3.x.y series. This is a very light release that only backported a v4.0.0 feature.

    Here's a list of changes in this version:

    • Added the final service functionality from v4.0.0 #27
    Source code(tar.gz)
    Source code(zip)
  • v3.3.2(Dec 4, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Support for C++17 noexcept function types
    Source code(tar.gz)
    Source code(zip)
  • v3.2.3(Dec 4, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Support for C++17 noexcept function types
    Source code(tar.gz)
    Source code(zip)
  • v3.1.3(Dec 4, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Support for C++17 noexcept function types
    Source code(tar.gz)
    Source code(zip)
  • v3.0.4(Dec 4, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Support for C++17 noexcept function types
    Source code(tar.gz)
    Source code(zip)
  • v3.3.1(Jul 20, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Fixed some type trait issues with msvc
    Source code(tar.gz)
    Source code(zip)
  • v3.3.0(May 18, 2017)

    I'm happy to announce that Kangaru, the C++11 and C++14 dependency injection container version 3.3.0 is out!

    This version is a feature release. Here's a quick look:

    • More compile time messages are supported and better error detection
    • Operator Services now has the same error detection and diagnostics as if the container were directly used #44
    • Generic lambda are supported by kgr::Container::invoke, as well as kgr::Invoker #43
    • Abstract Services are no longer abstract classes. #37

    To read more about kangaru, please visit our wiki!

    Source code(tar.gz)
    Source code(zip)
  • v3.2.2(Feb 21, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Fixed include path with exported package
    • Fixed kgr::GenericService not calling destructors. #40
    • Fixed calling invoke with a function that take no service triggering an Ambiguous call. #39
    Source code(tar.gz)
    Source code(zip)
  • v3.1.2(Feb 21, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Fixed include path with exported package
    Source code(tar.gz)
    Source code(zip)
  • v3.0.3(Feb 21, 2017)

    This is a bugfix release. This version is mostly to fix some unpleasant bugs. No big feature were added.

    Notable things changed in this release are:

    • Fixed include path with exported package
    Source code(tar.gz)
    Source code(zip)
Owner
Guillaume Racicot
Guillaume Racicot
Injection - Windows process injection methods

Windows Process Injection Here are some popular methods used for process injection on the windows operating system. Conhost ExtraBytes PROPagate Servi

null 1.4k Dec 28, 2022
🎮 Plants vs. Zombies multiplayer battle, developed via reverse engineering, inline hook and dynamic-link library injection. Two online players defend and attack as the plant side and zombie side respectively.

Plants vs. Zombies Online Battle This project has two original repositories: https://github.com/czs108/Plants-vs.-Zombies-Online-Battle https://github

Liugw 71 Oct 14, 2021
RR4J is a tool that records java execution and later allows developers to replay locally.

RR4J [Record Replay 4 Java] RR4J is a tool that records java execution and later allows developers to replay locally. The tool solves one of the chall

Kartik  kalaghatgi 18 Dec 7, 2022
A dependency free, embeddable debugger for Lua in a single file (.lua or .c)

debugger.lua A simple, embedabble debugger for Lua 5.x, and LuaJIT 2.x. debugger.lua is a simple, single file, pure Lua debugger that is easy to integ

Scott Lembcke 600 Dec 31, 2022
LuaZDF - Lua Zero Dependency Functions

LuaZDF - Lua Zero Dependency Functions LuaZDF is a collection of independet functions that have zero dependencies among themselves. A function in LuaZ

null 46 Jun 4, 2022
A small, dependency-free node editor extension for dear imgui.

imnodes A small, dependency-free node editor extension for dear imgui. Features: Create nodes, links, and pins in an immediate-mode style Single heade

Johann Muszynski 1.3k Dec 28, 2022
A header-only library for C++(0x) that allows automagic pretty-printing of any container.

cxx-prettyprint =============== A pretty printing library for C++ containers. Synopsis: Simply by including this header-only library in your sourc

Louis Delacroix 535 Nov 26, 2022
this package help you to give glassomorphic+ neomrphic both effects to a container (at a time).

duomorphsim this package help you to give glassomorphic+ neomrphic both effects to a container (at a time). Usage DuoMorphicCard need four argument wh

Lokesh Jangid 3 Aug 23, 2021
Running Docker container on Raspberry Pi (armhf)

Running Docker container on Raspberry Pi (armhf)

null 1 Nov 8, 2022
A composable container for Adaptive ROS 2 Node computations. Select between FPGA, CPU or GPU at run-time.

adaptive_component A composable stateless container for Adaptive ROS 2 Node computations. Select between FPGA, CPU or GPU at run-time. Nodes using har

ROS 2 Hardware Acceleration Working Group 7 Sep 9, 2022
Northstar-dedicated - Docker container for the Northstar dedicated server. Also includes general notes on running the dedi on Linux. WIP.

northstar-dedicated Docker image for the Northstar dedicated server. Not ready yet (it'll probably be another day or two). Versioning Tentative. Stabl

null 83 Jan 6, 2023
Flat map - Header only associative linear container.

flat_map flat_map is a header only associative container library that constructed on linear container. It compliants C++17/20 standard associative con

Kohei Takahashi 24 Aug 26, 2022
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Paulo Rafael Ramalho 0 Jan 1, 2023
Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.

Karabiner-Elements Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra or later. Download You can download Karabiner-E

null 15.7k Dec 29, 2022
Masters degree research project source code. Might come back to it later.

Camflow Network Provenance Authors Tray Keller and Austin Waddell CamFlow and the Linux Provenance Module (LPM) framework are both an excellent step i

Tray Keller 2 Mar 14, 2022
Transacted Hollowing - a PE injection technique, hybrid between ProcessHollowing and ProcessDoppelgänging

Transacted Hollowing Transacted Hollowing - a PE injection technique. A hybrid between Process Hollowing and Process Doppelgänging. More info here Cha

hasherezade 430 Dec 24, 2022
TiEtwAgent - PoC memory injection detection agent based on ETW, for offensive and defensive research purposes

TiEtwAgent - ETW-based process injection detection This project was created to research, build and test different memory injection detection use cases

Filip Olszak 187 Dec 20, 2022
Linux x86_64 Process Injection Utility | Manipulate Processes With Customized Payloads (beta)

K55 - Linux x86_64 Process Injection Utility (C++11) About K55 (pronounced: "kay fifty-five") The K55 payload injection tool is used for injecting x86

Josh Schiavone 57 Sep 5, 2022
a undetectable tool by modify odyssey, support sign disable & dylib injection, test on iphoneX(13.5.1 expolit by FreeTheSandbox), our qqgroup is 703156427

a undetectable ios root access tool by modify odyssey, support sign disable & dylib injection, test on iphoneX(13.5.1 expolit by FreeTheSandbox), our

null 58 Nov 22, 2021