Skip to content

Commit cb680b1

Browse files
committed
Added readme, platform specifications and changed name to MatrixRustSDK
1 parent 29ec56d commit cb680b1

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

Package.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ let version = "v1.0.0-alpha"
88
let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
99

1010
let package = Package(
11-
name: "MatrixRustComponentsSwift",
11+
name: "MatrixRustSDK",
12+
platforms: [
13+
.iOS(.v15),
14+
.macOS(.v12)
15+
],
1216
products: [
1317
.library(
14-
name: "MatrixRustComponentsSwift",
15-
targets: ["MatrixRustComponentsSwift"]),
18+
name: "MatrixRustSDK",
19+
targets: ["MatrixRustSDK"]),
1620
],
1721
targets: [
1822
.binaryTarget(
@@ -32,10 +36,10 @@ let package = Package(
3236
path: "MatrixSDKFFIWrapper"
3337
),
3438
.target(
35-
name: "MatrixRustComponentsSwift",
39+
name: "MatrixRustSDK",
3640
dependencies: ["MatrixSDKFFIWrapper"]),
3741
.testTarget(
38-
name: "MatrixRustComponentsSwiftTests",
39-
dependencies: ["MatrixRustComponentsSwift"]),
42+
name: "MatrixRustSDKTests",
43+
dependencies: ["MatrixRustSDK"]),
4044
]
4145
)

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1-
# MatrixRustComponentsSwift
1+
# Swift package for Matrix Rust components
22

3-
A description of this package.
3+
This repository is a Swift Package for distributing releases of the [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk). It provides the Swift source code packaged in a format understood by the Swift package manager, and depends on a pre-compiled binary release of the underlying Rust code published from [Matrix Rust SDK](https://github.com/matrix-org/matrix-rust-sdk).
4+
5+
## Releasing
6+
7+
Whenever a new release of the underlying components is availble, we need to tag a new release in this repo to make them available to Swift components.
8+
To do so we need to:
9+
* running the `.xcframework` build script from `matrix-rust-sdk/apple`
10+
* copy the generated `.swift` files to this repository under `Sources/MatrixRustComponentsSwift`
11+
* create a new tag and upload the zipped version of the `.xcframework` to it's artifacts section
12+
* update the tag version inside `Package.swift`
13+
14+
## Testing locally
15+
16+
The package can be added to an Xcode project from a local checkout and the binary target can be configured with a local `path`.
17+
It might be necessary to manually add the resulting library to your project's `General/Frameworks, Libraries, and Embedded Content` for it to work.

Tests/MatrixRustComponentsSwiftTests/MatrixRustComponentsSwiftTests.swift renamed to Tests/MatrixRustSDKTests/MatrixRustComponentsSwiftTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import XCTest
2-
@testable import MatrixRustComponentsSwift
2+
@testable import MatrixRustSDK
33

44
final class MatrixRustComponentsSwiftTests: XCTestCase {
55
func testExample() throws {

0 commit comments

Comments
 (0)