# swift-protobuf を Homebrew, Nix でインストール

swift-protobuf のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:swift-protobuf
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install swift-protobuf
```

  証拠: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#protoc-gen-swift
```

  証拠: nixpkgs package indexes: pkgs/by-name/pr/protoc-gen-swift/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:swift-protobuf
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.38.1
- **ソース概要:** Plugin and runtime library for using protobuf with Swift
- **ホームページ:** <https://github.com/apple/swift-protobuf>
- **リポジトリ:** <https://github.com/apple/swift-protobuf>
- **最終更新:** 2026-06-23T19:48:06Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- protoc-gen-swift (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.38.1
## プロジェクトの歴史と使われ方

Swift Protobuf is Apple's Swift implementation for Protocol Buffers, combining a `protoc` code-generation plugin with the SwiftProtobuf runtime library used by generated Swift code.

### プロジェクトの歴史

The public repository was created in 2016, after Swift had become open source. The project joined Google's schema-first Protocol Buffers ecosystem by adding a Swift generator, `protoc-gen-swift`, and an idiomatic Swift runtime for generated types.

### 採用の歴史

The README documents multiple ways to consume the project: building the plugin with SwiftPM, installing the command-line generator through Homebrew, adding the runtime as a SwiftPM dependency, or consuming it through Xcode or CocoaPods. That mix reflects its dual role as both a CLI tool and a library dependency.

### 使われ方

Developers install or build `protoc-gen-swift`, run `protoc --swift_out=...` on `.proto` files, and add the SwiftProtobuf runtime to their Swift package, Xcode project, or CocoaPods project. The official documentation covers plugin behavior, generated-code APIs, internals, and contribution style.

### パッケージ好きにとっての重要性

Swift Protobuf matters to package-manager users because it bridges a language-specific package ecosystem with a cross-language serialization format. It gives Swift packages a generated-code workflow that stays compatible with Protocol Buffers used by Java, C++, Python, Objective-C, and other stacks.

### タイムライン

- 2016: Public GitHub repository created.
- Current docs: Provides both `protoc-gen-swift` and the SwiftProtobuf runtime library.
- Current docs: Homebrew installs the protobuf compiler and Swift code-generator plugin.

### Related projects

- The README ties Swift Protobuf to Apple's Swift language, Google's Protocol Buffers and `protoc`, Swift Package Manager, Xcode package dependencies, and CocoaPods.

### ソース

- <https://api.github.com/repos/apple/swift-protobuf>
- <https://formulae.brew.sh/api/formula/swift-protobuf.json>
- <https://github.com/apple/swift-protobuf#readme>
- <https://github.com/apple/swift-protobuf/tree/main/Documentation>


## セキュリティノート

swift-protobuf に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ URL を使えるよう、Nucleus パッケージメタデータはここに公開されています。


## 他のパッケージマネージャ記録

- Nix - protoc-gen-swift: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/pr/protoc-gen-swift/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/swift-protobuf.yml](https://github.com/mxcl/pkgdb/blob/main/combined/swift-protobuf.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
