Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. Weaver

Weaver

MITSwift1.1.7

A declarative, compile-time safe dependency injection framework for Swift applications on iOS, macOS, and Linux.

Visit WebsiteGitHubGitHub
769 stars36 forks0 contributors

What is Weaver?

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.

Target Audience

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.

Value Proposition

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.

Overview

Dependency Injection framework for Swift (iOS/macOS/Linux)

Use Cases

Best For

  • Managing dependencies in large Swift codebases
  • Ensuring type safety and non-optional dependency resolution
  • Automating DI container boilerplate generation
  • Validating dependency graphs at compile time
  • Supporting multi-platform Swift projects (iOS/macOS/Linux)
  • Integrating dependency injection with Objective-C interoperability

Not Ideal For

  • Projects requiring active maintenance and community support
  • Teams preferring runtime DI frameworks without code generation overhead
  • SwiftUI-focused applications needing seamless declarative integration
  • Environments with strict CI/CD pipelines that avoid deprecated tools

Pros & Cons

Pros

Compile-Time Safety

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.

Automatic Code Generation

Generates DI container boilerplate code automatically, reducing manual setup and errors, demonstrated by the auto-generated resolvers and containers.

Type-Safe Resolution

Resolves dependencies with full type safety and without optionals, ensuring reliable injection, as listed in the key features.

Objective-C Support

Provides compatibility with Objective-C codebases, making it suitable for mixed-language projects, as noted in the features.

Cons

Deprecated and Unsupported

The project is archived with no updates or support, posing risks for long-term use due to potential Swift version incompatibilities and security issues.

Complex Build Phase Setup

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.

Annotation Clutter

Relies on comments or property wrappers for declarations, which can make source code verbose and less readable, especially in large projects.

Frequently Asked Questions

Quick Stats

Stars769
Forks36
Contributors0
Open Issues0
Last commit4 months ago
CreatedSince 2018

Tags

#ios#software-architecture#dependency-injection#type-safe#linux#mobile-development#swift#code-generation#macos#compile-time

Built With

S
SourceKitten
S
SourceKit
S
Swift

Links & Resources

Website

Included in

iOS51.7kSwift26.0k
Auto-fetched 4 hours ago

Related Projects

SwinjectSwinject

Dependency injection framework for Swift with iOS/macOS/Linux

Stars6,707
Forks544
Last commit10 months ago
TyphoonTyphoon

Powerful dependency injection for Objective-C ✨✨ (https://github.com/appsquickly/pilgrim is the pure Swift successor to Typhoon!!)✨✨

Stars2,692
Forks261
Last commit5 years ago
NeedleNeedle

Compile-time safe Swift dependency injection framework

Stars2,006
Forks160
Last commit2 months ago
DipDip

Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!

Stars980
Forks71
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub