Closed Bug 2048346 Opened 5 months ago Closed 4 months ago

Add UniFFI bindings for the sponsored content client component

Categories

(Toolkit :: UniFFI Bindings, task)

task

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: ahanot, Assigned: ahanot)

References

Details

Attachments

(1 external file, 1 obsolete file)

Wire the vendored application-services sponsored content client component into the desktop UniFFI bindings:

  • Add the component as a path override in the workspace Cargo.toml and as a dependency of gkrust-uniffi-components.
  • Register the component in lib.rs and moz.build, and add async-wrapper configuration in config.toml.
  • Regenerate the JS bindings, C++ scaffolding and API docs. Adding the component renumbers the shared UniFFI function table, which accounts for the churn in the other generated Rust*.sys.mjs files.

This only adds the bindings; consumers are added in follow-ups.

Wire the vendored application-services sponsored content client component
into the desktop UniFFI bindings:

  • Add the component as a path override in the workspace Cargo.toml and as
    a dependency of gkrust-uniffi-components.
  • Register the component in lib.rs and moz.build, and add async-wrapper
    configuration in config.toml.
  • Regenerate the JS bindings, C++ scaffolding and API docs. Adding the
    component renumbers the shared UniFFI function table, which accounts for
    the churn in the other generated Rust*.sys.mjs files.

This only adds the bindings; consumers are added in follow-ups.

Assignee: nobody → ahanot
Status: NEW → ASSIGNED

Wire the vendored application-services sponsored content client component
into the desktop UniFFI bindings:

  • Add the component as a path override in the workspace Cargo.toml and as
    a dependency of gkrust-uniffi-components.
  • Register the component in lib.rs and moz.build, and add async-wrapper
    configuration in config.toml.
  • Allow FireAndForget on the vtable methods of with_foreign trait
    interfaces in callables.rs. The telemetry callback interface exposes each
    method both as a JS->Rust Method and a Rust->JS VTableMethod;
    FireAndForget applies only to the vtable direction while the regular
    method stays Sync. This avoids a main-thread deadlock where the
    synchronous constructor fires callbacks back into the blocked main
    thread.
  • Build the generator's UniFFI library against the objdir in
    mach_commands.py so nss links dynamically against libnss3 during
    regeneration.
  • Regenerate the JS bindings, C++ scaffolding and API docs. Adding the
    component renumbers the shared UniFFI function table, which accounts for
    the churn in the other generated Rust*.sys.mjs files. The viaduct doc
    also gains a few OHTTP entries whose checked-in bindings had drifted from
    the vendored component.

This only adds the bindings; consumers are added in follow-ups.

Attachment #9598469 - Attachment is obsolete: true
Attachment #9598498 - Attachment description: WIP: Bug 2048346 - Add UniFFI bindings for the sponsored content client component r?#home-newtab-reviewers → WIP: Bug 2048346 - Add UniFFI bindings for the sponsored content client component
Attachment #9598498 - Attachment description: WIP: Bug 2048346 - Add UniFFI bindings for the sponsored content client component → Bug 2048346 - Add UniFFI bindings for the sponsored content client component
Attachment #9598498 - Attachment description: Bug 2048346 - Add UniFFI bindings for the sponsored content client component → Bug 2048346 - Add UniFFI bindings for the sponsored content client component r?#home-newtab-reviewers
Depends on: 2049524
Pushed by amarc@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/08e581757557 https://hg.mozilla.org/integration/autoland/rev/65304fa7e690 Revert "Bug 2048346 - Add UniFFI bindings for the sponsored content client component r=bdk" for causing bc failures @ browser_all_files_referenced

Backed out for causing bc failures

Flags: needinfo?(ahanot)
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
Blocks: 2051420
Depends on: 2038896
No longer depends on: 2049524
QA Whiteboard: [qa-triage-done-c155/b154]
Flags: needinfo?(ahanot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: