Lockjaw - Dagger inspired compile-time dependency injection framework


Lockjaw is a fully static, compile-time dependency injection framework for Rust inspired by Dagger.

Dagger is a mature, widely used Dependency injection framework for Java. Lockjaw mimics Dagger's APIs and has recently achieved feature parity. It has also adapted to Rust's quirks and made it easier to use under the current ecosystem, including supports for cross crate injection.

User guide and preliminary game engine built with cross crate injection

Lockjaw is still very experimental, with the objective to explore hurdles of the current rust proc-macro system. One example is how Lockjaw resolves a symbol to its fully qualified path based on the context, which seems to be a common issue for proc-macro developers, and might be an interesting read.

That said, it is using too much hacks for it to be considered for serious usage. I still think it is interesting for experimenting, and illustrates some of the issues for the current Rust proc-macro.

Feedbacks welcomed, especially for a less hacky solution for any of the issues.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.