Closed Bug 1851256 Opened 2 years ago Closed 2 years ago

Vendor the application-services suggest Rust component into mozilla-central

Categories

(Firefox :: Sync, task)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(3 files)

We'd like to use the new Suggest component from application-services in desktop. This will allow us to use the same implementation across mobile and desktop to power the Firefox Suggest feature in the urlbar.

I'm filing this in Firefox::Sync since that seems to be the best place for application-services bugs. Please let me know or feel free to move this to a better component if there is one. The consumer of the Rust component will be desktop's urlbar.

This is part 1 of 2 and vendors the suggest component from
application-services into m-c. suggest depends on remote_settings, so it was
also vendored. Part 2 will generate JS bindings with uniffi.

This is my first time doing this so I'll explain how I generated this patch in
case I did something wrong:

  1. I manually added suggest to the following files:
    • Top-level Cargo.toml
    • toolkit/library/rust/shared/Cargo.toml
    • toolkit/library/rust/shared/lib.rs -- I followed the example of tabs,
      not sure if suggest::uniffi_reexport_scaffolding!() is necessary
  2. I ran ./mach vendor rust

That's it, there were no errors or problems.

This is part 2 of 2 and generates JS bindings for the suggest component. Part 1
is D187323.

This is my first time doing this so I'll explain how I generated this patch in
case I did something wrong:

  1. Added suggest to toolkit/components/uniffi-bindgen-gecko-js/mach_commands.py
  2. Ran ./mach uniffi generate
  3. Added the generated RustSuggest.sys.mjs to mc/toolkit/components/uniffi-bindgen-gecko-js/components/moz.build

Depends on D187323

Depends on D187324

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce79a3892b2d Part 1: Vendor the application-services suggest Rust component into mozilla-central. r=lina https://hg.mozilla.org/integration/autoland/rev/458969404775 Part 2: Generate JS bindings for the suggest Rust component. r=lina https://hg.mozilla.org/integration/autoland/rev/97d2090c8118 Part 3: Test fix. r=lina
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Blocks: 1851845
Blocks: 1859069
Blocks: 1861220
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: