Bug 2018944 - glean-sym - a Rust API built on top of the Glean UniFFI C FFI#3426
Open
Bug 2018944 - glean-sym - a Rust API built on top of the Glean UniFFI C FFI#3426
Conversation
dab03d7 to
23adcc4
Compare
badboy
commented
Mar 30, 2026
23adcc4 to
a6d1ef4
Compare
Merged
e1571f1 to
6a7603a
Compare
9b3dd70 to
85d08d6
Compare
Member
Author
|
I would like to land this (experimentally) sometime soon. The plan is to test it out with a metric in appservices, see https://bugzilla.mozilla.org/show_bug.cgi?id=2034534 Given this is an experiment and not a released crate we can tackle the open questions as we go along, instead of landing the perfectly finished PR. |
travis79
reviewed
Apr 29, 2026
Member
travis79
left a comment
There was a problem hiding this comment.
Okay, a decent first pass with several questions. Nothing really big aside from the comments in the metrics.rs about the mismatched Double type being bool
4a23b84 to
8fd60b6
Compare
…ated code over FFI This will be used later by glean-sys to build a Rust API via C FFI.
…C FFI This loads `libxul.so` (currently hard-coded), looks up the required symbols and wraps that in a nice Rust API. Other crates can depend on `glean-sym`, without needing to have Glean in the same library.
not done yet
…vokes functions in them
8fd60b6 to
e518814
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This small patch on a-s makes use of the new glean-sys crate: mozilla/application-services@main...badboy:application-services:glean-dylib
Todo:
Naming! Not sure I likeit was decided: glean-sym (as in glean-symbols)glean-sys.glean-sysand we inject alibxul.sointo it at test timeglean-sys/src/metrics.rsis generated. Currently by a test. That has a bit of a problem that you need to compile the code to generate the code, which breaks if the code doesn't compile. Might want to have a non-test way to generate that code.libxul.sois hard-coded. Ok for manual testing in Fenix, not sure we want to ship that as-islibxul.glean-build) to generate the correct code usable withglean-sys