apple/swift-protobuf

Plugin and runtime library for using protobuf with Swift

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 24 minutes ago
Added to GitGenius on September 13th, 2026
Created on September 2nd, 2016
Open Issues & Pull Requests: 63 (+0)
GitHub issues: Enabled
Number of forks: 540
Total Stargazers: 4,964 (+0)
Total Subscribers: 102 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 2.0 hours
Mean response time: 74.9 days
90th percentile: 14.0 days
Tracked items: 77

Most active contributors

Sign in to see contributor activity.

How this project is maintained

60% of open issues come from outside the core team, a mix of external reports and the maintainers' own roadmap. Three people close 79% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 20
New in 7 days: 1
Closed in 7 days: 1
Avg open age: 1,839 days
Stale 30+ days: 16
Stale 90+ days: 16

Recent activity

Opened in 7 days: 1
Closed in 7 days: 1
Comments in 7 days: 2
Events in 7 days: 2

Top labels

  • kind/enhancement (8)
  • kind/bug (5)
  • ⚠️ semver/major (5)
  • good first issue (2)
  • kind/support (2)
  • area/documentation (1)
  • size/S (1)

Detailed Description

Swift Protobuf is a plugin and runtime library that adds Protocol Buffer support to Apple's Swift programming language.

The project solves the problem of serializing and deserializing structured data in Swift by providing both a protoc plugin for code generation and a runtime library. Developers define their data structures in .proto schema files, run the plugin to generate idiomatic Swift code, and use the runtime library to serialize and deserialize that data. The generated types are Swift structs with copy-on-write value semantics, supporting both efficient binary serialization via the serializedBytes() method and standard JSON serialization through jsonUTF8Bytes(). Generated types are also Hashable and Equatable, making them suitable for use in sets and dictionaries.

Swift Protobuf suits projects that need cross-platform data exchange, since the same .proto files can generate compatible code for Java, C++, Python, and Objective-C. The tool is particularly valuable for teams prioritizing safety and correctness; it passes Google's full conformance test suite and avoids common hand-written serialization errors. The schema-driven approach provides clear documentation of communication conventions. Developers should adopt this tool if they are already using Protocol Buffers in other languages and need Swift interoperability, or if they want the safety guarantees and performance characteristics that code generation provides over hand-built serialization.

The project maintains extensive test coverage including its own test suite and Google's conformance tests. Documentation is comprehensive, covering plugin usage, API details, internal structure, and contribution guidelines. The codebase emphasizes performance optimization in both binary and JSON serializers and provides clear extension points for adding custom Swift functionality to generated types.