Open
Bug 1874029
Opened 1 year ago
Updated 1 year ago
UniFFI the `GetItemsOptions` builder in Remote Settings
Categories
(Application Services :: Remote Settings, task, P3)
Application Services
Remote Settings
Tracking
(Not tracked)
NEW
People
(Reporter: lina, Unassigned)
Details
From github: https://github.com/mozilla/application-services/issues/5608.
#5591 added a
GetItemsOptionsbuilder, and a Rust-onlyClient::get_records_raw_with_optionsinterface, to the Remote Settings component. https://github.com/mozilla/application-services/pull/5591/files#r1200749247 pointed out that this could be useful to expose to applications—that is, UniFFI consumers—too, not just other Rust consumers.This ticket would involve:
- Adding a UDL definition for
GetItemsOptions, or a wrapper around it with a different name.- Implementing the new UDL definition in Rust. The way we do this depends on what we expose. If we opt to expose
GetItemsOptionsdirectly, we'll need to make it thread-safe, because UniFFI requires all interfaces to beSend + Sync. This would involve protecting its mutable state with a mutex. If we instead expose a UniFFI-compatible wrapper aroundGetItemsOptions, thenGetItemsOptionscan remain mutable, and the wrapper can just hold aMutex<GetItemsOptions>.- Adding new methods to
remote_settings::Clientandremote_settings::RemoteSettingsthat return aRemoteSettingsResponse. This new method would callget_records_raw_with_options, just like the existingRemoteSettings::get_recordseventually callsClient::get_records_raw.- Adding Rust and Kotlin tests for the new interfaces.
This is a good next bug for folks interested in getting more familiar with UniFFI, and how we ship Rust code in Application Services. I'd be happy to mentor!
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
| Reporter | ||
Updated•1 year ago
|
Component: General → Remote Settings
You need to log in
before you can comment on or make changes to this bug.
Description
•