Skip to content

Commit c0fe708

Browse files
committed
chore: release 1.5.5
1 parent 101ddb5 commit c0fe708

4 files changed

Lines changed: 89 additions & 8 deletions

File tree

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ let FFIbinaryTarget: PackageDescription.Target
99
if ProcessInfo.processInfo.environment["LOCAL_BUILD"] != nil {
1010
FFIbinaryTarget = .binaryTarget(name: "LoroFFI", path: "./loroFFI.xcframework.zip")
1111
}else {
12-
FFIbinaryTarget = .binaryTarget(
13-
name: "LoroFFI",
14-
url: "https://github.com/loro-dev/loro-swift/releases/download/1.5.4/loroFFI.xcframework.zip",
15-
checksum: "b7d7be9897c9aacd52d4d7c4dde3fc53bcb8418ca3ae3d915373791e49d511e7"
16-
)
12+
FFIbinaryTarget = .binaryTarget(
13+
name: "LoroFFI",
14+
url: "https://github.com/loro-dev/loro-swift/releases/download/1.5.4/loroFFI.xcframework.zip",
15+
checksum: "b7d7be9897c9aacd52d4d7c4dde3fc53bcb8418ca3ae3d915373791e49d511e7"
16+
)
1717
}
1818

1919
let package = Package(

Sources/Loro/LoroFFI.swift

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,6 +2421,10 @@ public protocol FrontiersProtocol : AnyObject {
24212421

24222422
func eq(other: Frontiers) -> Bool
24232423

2424+
func isEmpty() -> Bool
2425+
2426+
func toVec() -> [Id]
2427+
24242428
}
24252429

24262430
open class Frontiers:
@@ -2519,6 +2523,20 @@ open func eq(other: Frontiers) -> Bool {
25192523
})
25202524
}
25212525

2526+
open func isEmpty() -> Bool {
2527+
return try! FfiConverterBool.lift(try! rustCall() {
2528+
uniffi_loro_ffi_fn_method_frontiers_is_empty(self.uniffiClonePointer(),$0
2529+
)
2530+
})
2531+
}
2532+
2533+
open func toVec() -> [Id] {
2534+
return try! FfiConverterSequenceTypeID.lift(try! rustCall() {
2535+
uniffi_loro_ffi_fn_method_frontiers_to_vec(self.uniffiClonePointer(),$0
2536+
)
2537+
})
2538+
}
2539+
25222540

25232541
}
25242542

@@ -10492,6 +10510,13 @@ public protocol VersionVectorProtocol : AnyObject {
1049210510

1049310511
func setLast(id: Id)
1049410512

10513+
func toHashmap() -> [UInt64: Int32]
10514+
10515+
/**
10516+
* Update the end counter of the given client if the end is greater. Return whether updated
10517+
*/
10518+
func tryUpdateLast(id: Id) -> Bool
10519+
1049510520
}
1049610521

1049710522
open class VersionVector:
@@ -10658,6 +10683,24 @@ open func setLast(id: Id) {try! rustCall() {
1065810683
}
1065910684
}
1066010685

10686+
open func toHashmap() -> [UInt64: Int32] {
10687+
return try! FfiConverterDictionaryUInt64Int32.lift(try! rustCall() {
10688+
uniffi_loro_ffi_fn_method_versionvector_to_hashmap(self.uniffiClonePointer(),$0
10689+
)
10690+
})
10691+
}
10692+
10693+
/**
10694+
* Update the end counter of the given client if the end is greater. Return whether updated
10695+
*/
10696+
open func tryUpdateLast(id: Id) -> Bool {
10697+
return try! FfiConverterBool.lift(try! rustCall() {
10698+
uniffi_loro_ffi_fn_method_versionvector_try_update_last(self.uniffiClonePointer(),
10699+
FfiConverterTypeID.lower(id),$0
10700+
)
10701+
})
10702+
}
10703+
1066110704

1066210705
}
1066310706

@@ -16027,6 +16070,32 @@ fileprivate struct FfiConverterSequenceTypeTextDelta: FfiConverterRustBuffer {
1602716070
}
1602816071
}
1602916072

16073+
#if swift(>=5.8)
16074+
@_documentation(visibility: private)
16075+
#endif
16076+
fileprivate struct FfiConverterDictionaryUInt64Int32: FfiConverterRustBuffer {
16077+
public static func write(_ value: [UInt64: Int32], into buf: inout [UInt8]) {
16078+
let len = Int32(value.count)
16079+
writeInt(&buf, len)
16080+
for (key, value) in value {
16081+
FfiConverterUInt64.write(key, into: &buf)
16082+
FfiConverterInt32.write(value, into: &buf)
16083+
}
16084+
}
16085+
16086+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [UInt64: Int32] {
16087+
let len: Int32 = try readInt(&buf)
16088+
var dict = [UInt64: Int32]()
16089+
dict.reserveCapacity(Int(len))
16090+
for _ in 0..<len {
16091+
let key = try FfiConverterUInt64.read(from: &buf)
16092+
let value = try FfiConverterInt32.read(from: &buf)
16093+
dict[key] = value
16094+
}
16095+
return dict
16096+
}
16097+
}
16098+
1603016099
#if swift(>=5.8)
1603116100
@_documentation(visibility: private)
1603216101
#endif
@@ -16280,6 +16349,12 @@ private var initializationResult: InitializationResult = {
1628016349
if (uniffi_loro_ffi_checksum_method_frontiers_eq() != 19191) {
1628116350
return InitializationResult.apiChecksumMismatch
1628216351
}
16352+
if (uniffi_loro_ffi_checksum_method_frontiers_is_empty() != 14722) {
16353+
return InitializationResult.apiChecksumMismatch
16354+
}
16355+
if (uniffi_loro_ffi_checksum_method_frontiers_to_vec() != 15210) {
16356+
return InitializationResult.apiChecksumMismatch
16357+
}
1628316358
if (uniffi_loro_ffi_checksum_method_localephemerallistener_on_ephemeral_update() != 58755) {
1628416359
return InitializationResult.apiChecksumMismatch
1628516360
}
@@ -17183,6 +17258,12 @@ private var initializationResult: InitializationResult = {
1718317258
if (uniffi_loro_ffi_checksum_method_versionvector_set_last() != 28435) {
1718417259
return InitializationResult.apiChecksumMismatch
1718517260
}
17261+
if (uniffi_loro_ffi_checksum_method_versionvector_to_hashmap() != 56398) {
17262+
return InitializationResult.apiChecksumMismatch
17263+
}
17264+
if (uniffi_loro_ffi_checksum_method_versionvector_try_update_last() != 58412) {
17265+
return InitializationResult.apiChecksumMismatch
17266+
}
1718617267
if (uniffi_loro_ffi_checksum_constructor_awareness_new() != 18821) {
1718717268
return InitializationResult.apiChecksumMismatch
1718817269
}

loro-swift/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

loro-swift/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name = "uniffi-bindgen"
1111
path = "src/uniffi-bindgen.rs"
1212

1313
[dependencies]
14-
loro-ffi = { version = "1.5.10" }
14+
loro-ffi = { version = "1.5.11" }
1515
uniffi = { version = "0.28.3" }
1616

1717
[build-dependencies]

0 commit comments

Comments
 (0)