Skip to content

Commit ada99b6

Browse files
authored
Merge pull request #17 from loro-dev/feat-sendable
feat: add sendable
2 parents ea19692 + 4ec9cd3 commit ada99b6

File tree

6 files changed

+35
-33
lines changed

6 files changed

+35
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: build-test
22
on:
3-
push:
4-
branches: [main]
53
pull_request:
64
branches: [main]
75

.github/workflows/pre-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ jobs:
6969
files: loroFFI.xcframework.zip
7070
draft: false
7171
prerelease: false
72+
generate_release_notes: true
7273
env:
7374
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7475

Sources/Loro/LoroFFI.swift

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8797,7 +8797,7 @@ public struct AbsolutePosition {
87978797
}
87988798

87998799

8800-
8800+
extension AbsolutePosition: Sendable {}
88018801
extension AbsolutePosition: Equatable, Hashable {
88028802
public static func ==(lhs: AbsolutePosition, rhs: AbsolutePosition) -> Bool {
88038803
if lhs.pos != rhs.pos {
@@ -8863,7 +8863,7 @@ public struct AwarenessPeerUpdate {
88638863
}
88648864

88658865

8866-
8866+
extension AwarenessPeerUpdate: Sendable {}
88678867
extension AwarenessPeerUpdate: Equatable, Hashable {
88688868
public static func ==(lhs: AwarenessPeerUpdate, rhs: AwarenessPeerUpdate) -> Bool {
88698869
if lhs.updated != rhs.updated {
@@ -9035,7 +9035,7 @@ public struct CommitOptions {
90359035
}
90369036

90379037

9038-
9038+
extension CommitOptions: Sendable {}
90399039
extension CommitOptions: Equatable, Hashable {
90409040
public static func ==(lhs: CommitOptions, rhs: CommitOptions) -> Bool {
90419041
if lhs.origin != rhs.origin {
@@ -9244,7 +9244,7 @@ public struct ContainerPath {
92449244
}
92459245

92469246

9247-
9247+
extension ContainerPath: Sendable {}
92489248
extension ContainerPath: Equatable, Hashable {
92499249
public static func ==(lhs: ContainerPath, rhs: ContainerPath) -> Bool {
92509250
if lhs.id != rhs.id {
@@ -9310,7 +9310,7 @@ public struct CounterSpan {
93109310
}
93119311

93129312

9313-
9313+
extension CounterSpan: Sendable {}
93149314
extension CounterSpan: Equatable, Hashable {
93159315
public static func ==(lhs: CounterSpan, rhs: CounterSpan) -> Bool {
93169316
if lhs.start != rhs.start {
@@ -9552,7 +9552,7 @@ public struct Id {
95529552
}
95539553

95549554

9555-
9555+
extension Id: Sendable {}
95569556
extension Id: Equatable, Hashable {
95579557
public static func ==(lhs: Id, rhs: Id) -> Bool {
95589558
if lhs.peer != rhs.peer {
@@ -9618,7 +9618,7 @@ public struct IdLp {
96189618
}
96199619

96209620

9621-
9621+
extension IdLp: Sendable {}
96229622
extension IdLp: Equatable, Hashable {
96239623
public static func ==(lhs: IdLp, rhs: IdLp) -> Bool {
96249624
if lhs.lamport != rhs.lamport {
@@ -9684,7 +9684,7 @@ public struct IdSpan {
96849684
}
96859685

96869686

9687-
9687+
extension IdSpan: Sendable {}
96889688
extension IdSpan: Equatable, Hashable {
96899689
public static func ==(lhs: IdSpan, rhs: IdSpan) -> Bool {
96909690
if lhs.peer != rhs.peer {
@@ -9846,7 +9846,7 @@ public struct ImportStatus {
98469846
}
98479847

98489848

9849-
9849+
extension ImportStatus: Sendable {}
98509850
extension ImportStatus: Equatable, Hashable {
98519851
public static func ==(lhs: ImportStatus, rhs: ImportStatus) -> Bool {
98529852
if lhs.success != rhs.success {
@@ -9956,7 +9956,7 @@ public struct PathItem {
99569956
}
99579957

99589958

9959-
9959+
extension PathItem: Sendable {}
99609960
extension PathItem: Equatable, Hashable {
99619961
public static func ==(lhs: PathItem, rhs: PathItem) -> Bool {
99629962
if lhs.container != rhs.container {
@@ -10024,7 +10024,7 @@ public struct PeerInfo {
1002410024
}
1002510025

1002610026

10027-
10027+
extension PeerInfo: Sendable {}
1002810028
extension PeerInfo: Equatable, Hashable {
1002910029
public static func ==(lhs: PeerInfo, rhs: PeerInfo) -> Bool {
1003010030
if lhs.state != rhs.state {
@@ -10142,7 +10142,7 @@ public struct StyleConfig {
1014210142
}
1014310143

1014410144

10145-
10145+
extension StyleConfig: Sendable {}
1014610146
extension StyleConfig: Equatable, Hashable {
1014710147
public static func ==(lhs: StyleConfig, rhs: StyleConfig) -> Bool {
1014810148
if lhs.expand != rhs.expand {
@@ -10200,7 +10200,7 @@ public struct TreeDiff {
1020010200
}
1020110201

1020210202

10203-
10203+
extension TreeDiff: Sendable {}
1020410204
extension TreeDiff: Equatable, Hashable {
1020510205
public static func ==(lhs: TreeDiff, rhs: TreeDiff) -> Bool {
1020610206
if lhs.diff != rhs.diff {
@@ -10260,7 +10260,7 @@ public struct TreeDiffItem {
1026010260
}
1026110261

1026210262

10263-
10263+
extension TreeDiffItem: Sendable {}
1026410264
extension TreeDiffItem: Equatable, Hashable {
1026510265
public static func ==(lhs: TreeDiffItem, rhs: TreeDiffItem) -> Bool {
1026610266
if lhs.target != rhs.target {
@@ -10326,7 +10326,7 @@ public struct TreeId {
1032610326
}
1032710327

1032810328

10329-
10329+
extension TreeId: Sendable {}
1033010330
extension TreeId: Equatable, Hashable {
1033110331
public static func ==(lhs: TreeId, rhs: TreeId) -> Bool {
1033210332
if lhs.peer != rhs.peer {
@@ -10440,7 +10440,7 @@ public struct UpdateOptions {
1044010440
}
1044110441

1044210442

10443-
10443+
extension UpdateOptions: Sendable {}
1044410444
extension UpdateOptions: Equatable, Hashable {
1044510445
public static func ==(lhs: UpdateOptions, rhs: UpdateOptions) -> Bool {
1044610446
if lhs.timeoutMs != rhs.timeoutMs {
@@ -10518,7 +10518,7 @@ public struct VersionVectorDiff {
1051810518
}
1051910519

1052010520

10521-
10521+
extension VersionVectorDiff: Sendable {}
1052210522
extension VersionVectorDiff: Equatable, Hashable {
1052310523
public static func ==(lhs: VersionVectorDiff, rhs: VersionVectorDiff) -> Bool {
1052410524
if lhs.retreat != rhs.retreat {
@@ -10772,7 +10772,7 @@ public func FfiConverterTypeContainerID_lower(_ value: ContainerId) -> RustBuffe
1077210772
}
1077310773

1077410774

10775-
10775+
extension ContainerId: Sendable {}
1077610776
extension ContainerId: Equatable, Hashable {}
1077710777

1077810778

@@ -10874,7 +10874,7 @@ public func FfiConverterTypeContainerType_lower(_ value: ContainerType) -> RustB
1087410874
}
1087510875

1087610876

10877-
10877+
extension ContainerType: Sendable {}
1087810878
extension ContainerType: Equatable, Hashable {}
1087910879

1088010880

@@ -11061,7 +11061,7 @@ public func FfiConverterTypeEventTriggerKind_lower(_ value: EventTriggerKind) ->
1106111061
}
1106211062

1106311063

11064-
11064+
extension EventTriggerKind: Sendable {}
1106511065
extension EventTriggerKind: Equatable, Hashable {}
1106611066

1106711067

@@ -11139,7 +11139,7 @@ public func FfiConverterTypeExpandType_lower(_ value: ExpandType) -> RustBuffer
1113911139
}
1114011140

1114111141

11142-
11142+
extension ExpandType: Sendable {}
1114311143
extension ExpandType: Equatable, Hashable {}
1114411144

1114511145

@@ -11219,7 +11219,7 @@ public func FfiConverterTypeIndex_lower(_ value: Index) -> RustBuffer {
1121911219
}
1122011220

1122111221

11222-
11222+
extension Index: Sendable {}
1122311223
extension Index: Equatable, Hashable {}
1122411224

1122511225

@@ -11922,7 +11922,7 @@ public func FfiConverterTypeLoroValue_lower(_ value: LoroValue) -> RustBuffer {
1192211922
}
1192311923

1192411924

11925-
11925+
extension LoroValue: Sendable {}
1192611926
extension LoroValue: Equatable, Hashable {}
1192711927

1192811928

@@ -11993,7 +11993,7 @@ public func FfiConverterTypeOrdering_lower(_ value: Ordering) -> RustBuffer {
1199311993
}
1199411994

1199511995

11996-
11996+
extension Ordering: Sendable {}
1199711997
extension Ordering: Equatable, Hashable {}
1199811998

1199911999

@@ -12064,7 +12064,7 @@ public func FfiConverterTypeSide_lower(_ value: Side) -> RustBuffer {
1206412064
}
1206512065

1206612066

12067-
12067+
extension Side: Sendable {}
1206812068
extension Side: Equatable, Hashable {}
1206912069

1207012070

@@ -12146,7 +12146,7 @@ public func FfiConverterTypeTextDelta_lower(_ value: TextDelta) -> RustBuffer {
1214612146
}
1214712147

1214812148

12149-
12149+
extension TextDelta: Sendable {}
1215012150
extension TextDelta: Equatable, Hashable {}
1215112151

1215212152

@@ -12233,7 +12233,7 @@ public func FfiConverterTypeTreeExternalDiff_lower(_ value: TreeExternalDiff) ->
1223312233
}
1223412234

1223512235

12236-
12236+
extension TreeExternalDiff: Sendable {}
1223712237
extension TreeExternalDiff: Equatable, Hashable {}
1223812238

1223912239

@@ -12314,7 +12314,7 @@ public func FfiConverterTypeTreeParentId_lower(_ value: TreeParentId) -> RustBuf
1231412314
}
1231512315

1231612316

12317-
12317+
extension TreeParentId: Sendable {}
1231812318
extension TreeParentId: Equatable, Hashable {}
1231912319

1232012320

@@ -12378,7 +12378,7 @@ public func FfiConverterTypeUndoOrRedo_lower(_ value: UndoOrRedo) -> RustBuffer
1237812378
}
1237912379

1238012380

12381-
12381+
extension UndoOrRedo: Sendable {}
1238212382
extension UndoOrRedo: Equatable, Hashable {}
1238312383

1238412384

loro-rs/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loro-rs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "loro-swift"
3-
version = "1.4.0"
3+
version = "1.4.1"
44
edition = "2021"
55

66
[lib]

loro-rs/uniffi.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[bindings.swift]
2+
module_name = "loro"
3+
experimental_sendable_value_types = true

0 commit comments

Comments
 (0)