Swift Package 和 Cocoapod,封装了由 bindings/xmtp_rust_swift
crate 在 libxmtp 中发出的 XCFramework
注意:此软件包不 供最终用户直接使用。请查看依赖于此软件包的 xmtp-ios。
在 Package.swift 中引用
...
.package(url: "https://github.com/xmtp/xmtp-rust-swift", from: "0.3.0-beta0")
...
在 Podspec 中引用
...
spec.dependency 'XMTPRust', '= 0.3.0-beta0'
...
┌────────────────────────────────────┬─────────────────────────────┬─────────────────────────────────┐
│ │ │ │
│ xmtp/libxmtp: Shared Rust Code │ xmtp/xmtp-rust-swift │ xmtp/xmtp-ios - iOS SDK │
│ - xmtp-networking │ - Git repo to host Swift │ - Existing iOS xmtp SDK │
│ - xmtp-proto │ Package │ - Consumes xmtp-rust-swift as │
│ | │ - Also contains Podspec │ a Cocoapod via spec.dependency │
│ ---> bindings_swift │ for XMTPRust pod │ │
│ │ ┌──────────────────────┐ │ │
│ ┌──────────┐ ┌───────────────┐ │ ┌─►│-Package.swift │ │ │
│ │xmtp-proto├────►│xmtp-networking│ │ │ │-XMTPRustSwift.xcfra..│ │ ┌──────────────────┐ │
│ └──────────┘ └─────┬─────────┘ │ │ │-Sources/... │ │ │ XMTP.podspec │ │
│ │ │ │ │ - [Generated files] │ │ │ Package.swift │ │
│ ┌───────────────▼────┐ │ │ └─────────┬────────────┘ │ ┌──► - │ │
│ │libxmtp/ │ │ │ │ Swift Pkg │ │ │ import XMTPRust │ │
│ │ bindings_swift │ │ │ └──────────────┼─┘ │ │ │
│ │ w/ swift-bridge │ │ │ Github url │ └────────┬─────────┘ │
│ └──────────┬─────────┘ │ ├────────┐ or Cocoapod │ │ │
│ │ │ │filecopy│ ├─────────────▼───────────────────┤
│ Output: │ │ ├────────┘ │xmtp/xmtp-react-native │
│ ┌────────────────▼─────────┐ │ │ │ - consumes xmtp/xmtp-ios │
│ │XMTPRustSwift.xcframework ├──────┼─┘ │ as a Cocoapod │
│ └──────────────────────────┘ │ │ │
│ │ │ │
└────────────────────────────────────┴─────────────────────────────┴─────────────────────────────────┘
注意: 没有任何发布版本被认为是为外部使用准备就绪的。此仓库仍在积极开发中。