リポジトリ
bleRPCは、メインのモノレポと、対応する各言語向けのプロトコルライブラリパッケージで構成されています。
リポジトリの関係
共有された単一の .proto 定義をもとに、言語ごとのプロトコルライブラリが提供され、各セントラルアプリとファームウェアから利用されます。
アーキテクチャ概要
tdaira/blerpc
ファームウェア、セントラルクライアント、コードジェネレーター、テストを含むメインのモノレポ。
blerpc.proto)プロトコルライブラリ
各言語向けに個別パッケージとして公開されている、プラットフォーム非依存のプロトコルエンコーディング/デコーディングライブラリです。
blerpc-protocol
Python C
コンテナの分割/再組み立て、コマンドのエンコーディング/デコーディング、E2E暗号化(鍵交換 + AES-128-GCM)。Pythonパッケージはpipでインストール可能です。C実装(c/src/ + c/include/)は組み込み用
pip install git+https://github.com/tdaira/blerpc-protocol.git
blerpc-protocol-swift
Swift
iOSおよびmacOS向けSwift Package。Foundation と CryptoKit(Appleプラットフォームフレームワーク)を使用。iOS 16以上、macOS 13以上をサポート
// Swift Package Manager
.package(url: "https://github.com/tdaira/blerpc-protocol-swift", from: "0.7.0")
blerpc-protocol-kt
Kotlin
Android向けKotlinライブラリ。GitHub Packages (Maven)で公開
implementation("com.blerpc:blerpc-protocol-kt:0.7.0")
blerpc-protocol-dart
Dart
Flutter向けPure Dartライブラリ。pub.devで公開。暗号化にはcryptographyパッケージを使用
blerpc_protocol: ^0.7.0
blerpc-protocol-rn
TypeScript
React Native向けTypeScriptライブラリ。暗号化には@noble/ciphers、@noble/curves、@noble/hashesを使用(純粋なJS、ネイティブ依存なし)
"@blerpc/protocol-rn": "github:tdaira/blerpc-protocol-rn"
CI / CD
各リポジトリには GitHub Actions CI があります:
| リポジトリ | CIチェック |
|---|---|
| blerpc | Pythonテスト + ruff lint、C lint (clang-format)、Go lint + build、iOSビルド、Androidビルド、Flutterビルド、React Nativeビルド |
| blerpc-protocol | Pythonテスト + lint、C lint + テスト |
| blerpc-protocol-swift | swift build、swift test、SwiftLint |
| blerpc-protocol-kt | Gradle test、ktlint |
| blerpc-protocol-dart | dart analyze、dart test、pub.devへの自動公開 |
| blerpc-protocol-rn | eslint、prettier check、jest test、npm publish |
ライセンス
すべての bleRPC リポジトリは Apache License 2.0 でライセンスされており、組み込みファームウェアを含め、オープンソース・クローズドソースを問わず自由に利用できます。