A declarative, compile-time safe dependency injection framework for Swift applications on iOS, macOS, and Linux.
Weaver is a dependency injection framework for Swift that allows developers to declare dependencies using annotations in code, which it then uses to generate the necessary boilerplate for injection. It solves the problem of managing complex dependency graphs in growing Swift applications by providing compile-time validation and automatic code generation, ensuring that dependencies are resolved safely and efficiently.
Swift developers building iOS, macOS, or Linux applications who need a robust, type-safe way to manage dependencies without resorting to singletons or manual dependency passing.
Developers choose Weaver because it offers a declarative, compile-time safe approach to dependency injection, eliminating runtime crashes related to dependency resolution and reducing boilerplate code through automatic generation.
Dependency Injection framework for Swift (iOS/macOS/Linux)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validates the entire dependency graph at compile time to prevent runtime crashes from missing or circular dependencies, as emphasized in the README's safety checks.
Generates DI container boilerplate code automatically, reducing manual setup and errors, demonstrated by the auto-generated resolvers and containers.
Resolves dependencies with full type safety and without optionals, ensuring reliable injection, as listed in the key features.
Provides compatibility with Objective-C codebases, making it suitable for mixed-language projects, as noted in the features.
The project is archived with no updates or support, posing risks for long-term use due to potential Swift version incompatibilities and security issues.
Requires a specific Xcode build phase configuration and command-line tool installation, which can be error-prone and adds maintenance overhead, as detailed in the installation section.
Relies on comments or property wrappers for declarations, which can make source code verbose and less readable, especially in large projects.