Skip to content

Commit 7692189

Browse files
author
Firefox Sync Engineering
committed
Nightly auto-update (124.0.20240206050329)
1 parent 1e18b1b commit 7692189

File tree

5 files changed

+174
-10
lines changed

5 files changed

+174
-10
lines changed

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// swift-tools-version:5.4
22
import PackageDescription
33

4-
let checksum = "718f5f7b1e84bbe22ea70889809c083ab3b020dedc332b9f27c2bf2de1fa83e8"
5-
let version = "124.0.20240205050332"
6-
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240205050332/artifacts/public/build/MozillaRustComponents.xcframework.zip"
4+
let checksum = "2f79c950cf878d594017900d030739f8626f9c4c7195179749b99ed42a41800e"
5+
let version = "124.0.20240206050329"
6+
let url = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240206050329/artifacts/public/build/MozillaRustComponents.xcframework.zip"
77

88
// Focus xcframework
9-
let focusChecksum = "414bf79e58749a6423cceb82a70c7840e94d391e2dd59d248c72ec37573ca1b8"
10-
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240205050332/artifacts/public/build/FocusRustComponents.xcframework.zip"
9+
let focusChecksum = "4feb078c3dfc5c71588ed6f2b61fe3b5371916837dcfb706801a0dc06b9cbb0e"
10+
let focusUrl = "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.application-services.v2.swift.124.20240206050329/artifacts/public/build/FocusRustComponents.xcframework.zip"
1111
let package = Package(
1212
name: "MozillaRustComponentsSwift",
1313
platforms: [.iOS(.v14)],

swift-source/all/Generated/Metrics/Metrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extension GleanMetrics {
2525
// Intentionally left private, no external user can instantiate a new global object.
2626
}
2727

28-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 5, hour: 5, minute: 21, second: 14))
28+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 6, hour: 5, minute: 22, second: 58))
2929
}
3030

3131
enum NimbusEvents {

swift-source/all/Generated/suggest.swift

Lines changed: 139 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,125 @@ public func FfiConverterTypeSuggestStore_lower(_ value: SuggestStore) -> UnsafeM
534534
}
535535

536536

537+
public protocol SuggestStoreBuilderProtocol {
538+
func build() throws -> SuggestStore
539+
func cachePath(path: String) -> SuggestStoreBuilder
540+
func dataPath(path: String) -> SuggestStoreBuilder
541+
func remoteSettingsConfig(config: RemoteSettingsConfig) -> SuggestStoreBuilder
542+
543+
}
544+
545+
public class SuggestStoreBuilder: SuggestStoreBuilderProtocol {
546+
fileprivate let pointer: UnsafeMutableRawPointer
547+
548+
// TODO: We'd like this to be `private` but for Swifty reasons,
549+
// we can't implement `FfiConverter` without making this `required` and we can't
550+
// make it `required` without making it `public`.
551+
required init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) {
552+
self.pointer = pointer
553+
}
554+
public convenience init() {
555+
self.init(unsafeFromRawPointer: try! rustCall() {
556+
uniffi_suggest_fn_constructor_suggeststorebuilder_new($0)
557+
})
558+
}
559+
560+
deinit {
561+
try! rustCall { uniffi_suggest_fn_free_suggeststorebuilder(pointer, $0) }
562+
}
563+
564+
565+
566+
567+
568+
569+
public func build() throws -> SuggestStore {
570+
return try FfiConverterTypeSuggestStore.lift(
571+
try
572+
rustCallWithError(FfiConverterTypeSuggestApiError.lift) {
573+
uniffi_suggest_fn_method_suggeststorebuilder_build(self.pointer, $0
574+
)
575+
}
576+
)
577+
}
578+
579+
public func cachePath(path: String) -> SuggestStoreBuilder {
580+
return try! FfiConverterTypeSuggestStoreBuilder.lift(
581+
try!
582+
rustCall() {
583+
584+
uniffi_suggest_fn_method_suggeststorebuilder_cache_path(self.pointer,
585+
FfiConverterString.lower(path),$0
586+
)
587+
}
588+
)
589+
}
590+
591+
public func dataPath(path: String) -> SuggestStoreBuilder {
592+
return try! FfiConverterTypeSuggestStoreBuilder.lift(
593+
try!
594+
rustCall() {
595+
596+
uniffi_suggest_fn_method_suggeststorebuilder_data_path(self.pointer,
597+
FfiConverterString.lower(path),$0
598+
)
599+
}
600+
)
601+
}
602+
603+
public func remoteSettingsConfig(config: RemoteSettingsConfig) -> SuggestStoreBuilder {
604+
return try! FfiConverterTypeSuggestStoreBuilder.lift(
605+
try!
606+
rustCall() {
607+
608+
uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config(self.pointer,
609+
FfiConverterTypeRemoteSettingsConfig_lower(config),$0
610+
)
611+
}
612+
)
613+
}
614+
}
615+
616+
public struct FfiConverterTypeSuggestStoreBuilder: FfiConverter {
617+
typealias FfiType = UnsafeMutableRawPointer
618+
typealias SwiftType = SuggestStoreBuilder
619+
620+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SuggestStoreBuilder {
621+
let v: UInt64 = try readInt(&buf)
622+
// The Rust code won't compile if a pointer won't fit in a UInt64.
623+
// We have to go via `UInt` because that's the thing that's the size of a pointer.
624+
let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: v))
625+
if (ptr == nil) {
626+
throw UniffiInternalError.unexpectedNullPointer
627+
}
628+
return try lift(ptr!)
629+
}
630+
631+
public static func write(_ value: SuggestStoreBuilder, into buf: inout [UInt8]) {
632+
// This fiddling is because `Int` is the thing that's the same size as a pointer.
633+
// The Rust code won't compile if a pointer won't fit in a `UInt64`.
634+
writeInt(&buf, UInt64(bitPattern: Int64(Int(bitPattern: lower(value)))))
635+
}
636+
637+
public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SuggestStoreBuilder {
638+
return SuggestStoreBuilder(unsafeFromRawPointer: pointer)
639+
}
640+
641+
public static func lower(_ value: SuggestStoreBuilder) -> UnsafeMutableRawPointer {
642+
return value.pointer
643+
}
644+
}
645+
646+
647+
public func FfiConverterTypeSuggestStoreBuilder_lift(_ pointer: UnsafeMutableRawPointer) throws -> SuggestStoreBuilder {
648+
return try FfiConverterTypeSuggestStoreBuilder.lift(pointer)
649+
}
650+
651+
public func FfiConverterTypeSuggestStoreBuilder_lower(_ value: SuggestStoreBuilder) -> UnsafeMutableRawPointer {
652+
return FfiConverterTypeSuggestStoreBuilder.lower(value)
653+
}
654+
655+
537656
public struct SuggestIngestionConstraints {
538657
public var maxSuggestions: UInt64?
539658

@@ -725,7 +844,7 @@ public enum Suggestion {
725844
case pocket(title: String, url: String, score: Double, isTopPick: Bool)
726845
case wikipedia(title: String, url: String, icon: [UInt8]?, fullKeyword: String)
727846
case amo(title: String, url: String, iconUrl: String, description: String, rating: String?, numberOfRatings: Int64, guid: String, score: Double)
728-
case yelp(url: String, title: String)
847+
case yelp(url: String, title: String, isTopPick: Bool)
729848
case mdn(title: String, url: String, description: String, score: Double)
730849
case weather(score: Double)
731850
}
@@ -779,7 +898,8 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
779898

780899
case 5: return .yelp(
781900
url: try FfiConverterString.read(from: &buf),
782-
title: try FfiConverterString.read(from: &buf)
901+
title: try FfiConverterString.read(from: &buf),
902+
isTopPick: try FfiConverterBool.read(from: &buf)
783903
)
784904

785905
case 6: return .mdn(
@@ -845,10 +965,11 @@ public struct FfiConverterTypeSuggestion: FfiConverterRustBuffer {
845965
FfiConverterDouble.write(score, into: &buf)
846966

847967

848-
case let .yelp(url,title):
968+
case let .yelp(url,title,isTopPick):
849969
writeInt(&buf, Int32(5))
850970
FfiConverterString.write(url, into: &buf)
851971
FfiConverterString.write(title, into: &buf)
972+
FfiConverterBool.write(isTopPick, into: &buf)
852973

853974

854975
case let .mdn(title,url,description,score):
@@ -1181,9 +1302,24 @@ private var initializationResult: InitializationResult {
11811302
if (uniffi_suggest_checksum_method_suggeststore_query() != 22367) {
11821303
return InitializationResult.apiChecksumMismatch
11831304
}
1305+
if (uniffi_suggest_checksum_method_suggeststorebuilder_build() != 32624) {
1306+
return InitializationResult.apiChecksumMismatch
1307+
}
1308+
if (uniffi_suggest_checksum_method_suggeststorebuilder_cache_path() != 30962) {
1309+
return InitializationResult.apiChecksumMismatch
1310+
}
1311+
if (uniffi_suggest_checksum_method_suggeststorebuilder_data_path() != 50155) {
1312+
return InitializationResult.apiChecksumMismatch
1313+
}
1314+
if (uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_config() != 34189) {
1315+
return InitializationResult.apiChecksumMismatch
1316+
}
11841317
if (uniffi_suggest_checksum_constructor_suggeststore_new() != 38439) {
11851318
return InitializationResult.apiChecksumMismatch
11861319
}
1320+
if (uniffi_suggest_checksum_constructor_suggeststorebuilder_new() != 26099) {
1321+
return InitializationResult.apiChecksumMismatch
1322+
}
11871323

11881324
return InitializationResult.ok
11891325
}

swift-source/all/Generated/suggestFFI.h

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ void uniffi_suggest_fn_method_suggeststore_interrupt(void*_Nonnull ptr, RustCall
7575
);
7676
RustBuffer uniffi_suggest_fn_method_suggeststore_query(void*_Nonnull ptr, RustBuffer query, RustCallStatus *_Nonnull out_status
7777
);
78+
void uniffi_suggest_fn_free_suggeststorebuilder(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
79+
);
80+
void*_Nonnull uniffi_suggest_fn_constructor_suggeststorebuilder_new(RustCallStatus *_Nonnull out_status
81+
82+
);
83+
void*_Nonnull uniffi_suggest_fn_method_suggeststorebuilder_build(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status
84+
);
85+
void*_Nonnull uniffi_suggest_fn_method_suggeststorebuilder_cache_path(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status
86+
);
87+
void*_Nonnull uniffi_suggest_fn_method_suggeststorebuilder_data_path(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status
88+
);
89+
void*_Nonnull uniffi_suggest_fn_method_suggeststorebuilder_remote_settings_config(void*_Nonnull ptr, RustBuffer config, RustCallStatus *_Nonnull out_status
90+
);
7891
int8_t uniffi_suggest_fn_func_raw_suggestion_url_matches(RustBuffer raw_url, RustBuffer url, RustCallStatus *_Nonnull out_status
7992
);
8093
RustBuffer ffi_suggest_rustbuffer_alloc(int32_t size, RustCallStatus *_Nonnull out_status
@@ -205,9 +218,24 @@ uint16_t uniffi_suggest_checksum_method_suggeststore_interrupt(void
205218
);
206219
uint16_t uniffi_suggest_checksum_method_suggeststore_query(void
207220

221+
);
222+
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_build(void
223+
224+
);
225+
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_cache_path(void
226+
227+
);
228+
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_data_path(void
229+
230+
);
231+
uint16_t uniffi_suggest_checksum_method_suggeststorebuilder_remote_settings_config(void
232+
208233
);
209234
uint16_t uniffi_suggest_checksum_constructor_suggeststore_new(void
210235

236+
);
237+
uint16_t uniffi_suggest_checksum_constructor_suggeststorebuilder_new(void
238+
211239
);
212240
uint32_t ffi_suggest_uniffi_contract_version(void
213241

swift-source/focus/Generated/Metrics/Metrics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extension GleanMetrics {
2525
// Intentionally left private, no external user can instantiate a new global object.
2626
}
2727

28-
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 5, hour: 5, minute: 21, second: 17))
28+
public static let info = BuildInfo(buildDate: DateComponents(calendar: Calendar.current, timeZone: TimeZone(abbreviation: "UTC"), year: 2024, month: 2, day: 6, hour: 5, minute: 23, second: 1))
2929
}
3030

3131
enum NimbusEvents {

0 commit comments

Comments
 (0)