XMTPRust 0.3.7-beta0

XMTPRust 0.3.7-beta0

Michael XuPatNicholas MolnarNaomiDaniel McCartneyMartinRichard Hua维护。



XMTPRust 0.3.7-beta0

  • XMTP Labs

XMTP Rust Swift

Swift 包和 Cocoapod,封装了由 bindings/xmtp_rust_swiftcrate 发出的 XCFramework,在 libxmtp 中。

用法

注意:此包并非面向最终用户直接使用。相反,请查看依赖此包的 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                   │
│  └──────────────────────────┘      │                             │                                 │
│                                    │                             │                                 │
└────────────────────────────────────┴─────────────────────────────┴─────────────────────────────────┘

发行版

注意:没有任何发行版被认为是可对外使用的。此存储库正在处于非常初步的工作状态。

  • 0.3.0-beta0 - 使用 protobuf 在桥接处进行序列化。支持 batch_query。
  • 0.2.2-beta0 - 修复 QueryResponse 中的错误,任何接入器调用都会导致其被释放。从 include/ 目录中删除 .swift 文件。
  • 0.2.1-beta0 - 修复 RustString 未正确实现 NSError 的错误。
  • 0.2.0-beta0 - 0.1.2-beta0 的第一个非 JSON 绑定版本,打破 xmtp-ios 使用的 API,但没有大的变动,因为仍然是预发布版。
  • 0.1.2-beta0 - Cocoapod 和 Swift 包的第一个发布版本,替换了 xmtp-ios 中的依赖项,从而阻止了 xmtp-ios 的 Cocoapod 打包。
  • 0.1.0 - 第一个具有 publish/query 工作的 Swift 包发布版本。
  • 0.1.1 - 第一个尝试发布与 Swift 包和 Cocoapod 兼容的仓库。