Deli is a Swift dependency injection container that automatically generates DI containers and validates dependency graphs at build time.
Deli is a dependency injection container for Swift that automatically generates DI containers by analyzing source code and validates dependency graphs at build time. It helps manage dependencies in iOS, macOS, or other Swift projects, reducing manual boilerplate and preventing runtime issues like circular dependencies.
Swift developers building iOS, macOS, or server-side applications who want a robust, automated dependency injection solution to manage complex dependency graphs and ensure code maintainability.
Developers choose Deli for its automatic code generation, build-time validation, and Swift-native design, which reduces manual DI setup and catches dependency errors early. Its support for qualifiers, configuration properties, and property wrappers provides a flexible and type-safe DI experience.
Deli is an easy-to-use Dependency Injection(DI).
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Deli automatically analyzes source code to generate dependency graphs from classes, structs, and protocols conforming to Component or Autowired, significantly reducing manual registration boilerplate.
It validates dependency graphs during build, detecting circular dependencies and configuration errors before runtime, ensuring early issue catching as demonstrated in the LazyAutowired example.
Supports type-safe configuration via YAML files and property wrappers like @PropertyValue, allowing environment-specific settings without code changes, as shown in the Configuration Property section.
Leverages Swift 5.1+ features such as property wrappers and protocols, providing a modern, type-safe DI experience tailored for iOS, macOS, and server-side Swift projects.
Requires YAML configuration files, Xcode scheme sharing, and build script integration, which can be cumbersome and error-prone for new users, as outlined in the Getting Started section.
Relies on binaries and libraries like SourceKitten for code analysis, adding potential maintenance overhead and points of failure in CI/CD pipelines.
The need for code generation means dependency changes require a rebuild, which can slow development iterations compared to purely runtime DI solutions.