зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1654538 - Rename FOG crates to be more specific r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D85326
This commit is contained in:
Родитель
09e0660397
Коммит
dcca80d8fc
|
@ -1501,9 +1501,24 @@ checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
|
|||
[[package]]
|
||||
name = "fog"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"chrono",
|
||||
"glean-core",
|
||||
"log",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"tempfile",
|
||||
"uuid",
|
||||
"xpcom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fog_control"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"cstr",
|
||||
"glean",
|
||||
"fog",
|
||||
"glean-core",
|
||||
"log",
|
||||
"nserror",
|
||||
|
@ -1930,7 +1945,7 @@ dependencies = [
|
|||
"fluent-ffi",
|
||||
"fluent-langneg",
|
||||
"fluent-langneg-ffi",
|
||||
"fog",
|
||||
"fog_control",
|
||||
"gecko_logger",
|
||||
"geckoservo",
|
||||
"gkrust_utils",
|
||||
|
@ -1995,21 +2010,6 @@ dependencies = [
|
|||
"gl_generator",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glean"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"chrono",
|
||||
"glean-core",
|
||||
"log",
|
||||
"once_cell",
|
||||
"serde",
|
||||
"tempfile",
|
||||
"uuid",
|
||||
"xpcom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glean-core"
|
||||
version = "31.4.0"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "fog"
|
||||
name = "fog_control"
|
||||
version = "0.1.0"
|
||||
authors = ["Glean SDK team <glean-team@mozilla.com>"]
|
||||
edition = "2018"
|
||||
|
@ -13,10 +13,10 @@ nsstring = { path = "../../../xpcom/rust/nsstring" }
|
|||
static_prefs = { path = "../../../modules/libpref/init/static_prefs" }
|
||||
xpcom = { path = "../../../xpcom/rust/xpcom" }
|
||||
once_cell = "1.2.0"
|
||||
glean = { path = "./api" }
|
||||
fog = { path = "./api" }
|
||||
cstr = "0.1"
|
||||
viaduct = { git = "https://github.com/mozilla/application-services", rev = "61dcc364ac0d6d0816ab88a494bbf20d824b009b" } # Copied from toolkit/library/rust/shared/Cargo.toml
|
||||
url = "2.1" # Copied from viaduct's deps, see https://github.com/mozilla/application-services/issues/3062
|
||||
|
||||
[features]
|
||||
with_gecko = ["glean/with_gecko"]
|
||||
with_gecko = ["fog/with_gecko"]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "glean"
|
||||
name = "fog"
|
||||
version = "0.1.0"
|
||||
authors = ["Glean SDK team <glean-team@mozilla.com>"]
|
||||
edition = "2018"
|
||||
|
|
|
@ -17,7 +17,7 @@ This module is the glue between Firefox and Glean.
|
|||
|
||||
* The code lives in `toolkit/components/glean/src`.
|
||||
* It is written in Rust.
|
||||
* The crate is named `fog`.
|
||||
* The crate is named `fog_control`.
|
||||
* It is not published to crates.io.
|
||||
* It is not consumed by other Rust crates inside mozilla-central.
|
||||
|
||||
|
@ -28,6 +28,7 @@ This module is responsible for
|
|||
* watching the Firefox Telemetry data upload preference (`datareporting.healthreport.uploadEnabled`)
|
||||
* scheduling builtin pings
|
||||
* controling ping upload workers
|
||||
* passing IPC buffers
|
||||
|
||||
It calls into `glean_core` to:
|
||||
|
||||
|
@ -35,13 +36,18 @@ It calls into `glean_core` to:
|
|||
* toggle `upload_enabled`
|
||||
* get upload tasks
|
||||
|
||||
It calls into `fog` to:
|
||||
|
||||
* pass IPC buffers
|
||||
* record to its own metrics
|
||||
|
||||
## FOG API
|
||||
|
||||
This module provides the user-facing API for Glean inside mozilla-central.
|
||||
|
||||
* The code lives in `toolkit/components/glean/api`.
|
||||
* It is written in Rust.
|
||||
* The crate is named `glean`.
|
||||
* The crate is named `fog`.
|
||||
* It is not published to crates.io.
|
||||
* It can be consumed by other Rust crates inside mozilla-central for their Glean usage.
|
||||
* It will provide a build task for `glean_parser` integration.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FIXME: Remove when code gets actually used eventually (by initializing Glean).
|
||||
#![allow(dead_code)]
|
||||
|
||||
use glean::ping_upload::{self, UploadResult};
|
||||
use fog::ping_upload::{self, UploadResult};
|
||||
use glean_core::{global_glean, setup_glean, Configuration, Glean, Result};
|
||||
use once_cell::sync::OnceCell;
|
||||
use url::Url;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
// No one is currently using the Glean SDK, so let's export it, so we know it gets
|
||||
// compiled.
|
||||
pub extern crate glean;
|
||||
pub extern crate fog;
|
||||
|
||||
#[macro_use]
|
||||
extern crate cstr;
|
||||
|
@ -176,7 +176,7 @@ static mut PENDING_BUF: Vec<u8> = Vec::new();
|
|||
/// fog_give_ipc_buf on).
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn fog_serialize_ipc_buf() -> usize {
|
||||
if let Some(buf) = glean::ipc::take_buf() {
|
||||
if let Some(buf) = fog::ipc::take_buf() {
|
||||
PENDING_BUF = buf;
|
||||
PENDING_BUF.len()
|
||||
} else {
|
||||
|
@ -205,7 +205,7 @@ pub unsafe extern "C" fn fog_give_ipc_buf(buf: *mut u8, buf_len: usize) -> usize
|
|||
/// buf before and after this call.
|
||||
pub unsafe extern "C" fn fog_use_ipc_buf(buf: *const u8, buf_len: usize) {
|
||||
let slice = std::slice::from_raw_parts(buf, buf_len);
|
||||
let _res = glean::ipc::replay_from_buf(slice);
|
||||
let _res = fog::ipc::replay_from_buf(slice);
|
||||
/*if res.is_err() {
|
||||
// TODO: Record the error.
|
||||
}*/
|
||||
|
|
|
@ -48,7 +48,7 @@ rlbox_lucet_sandbox = { version = "0.1.0", optional = true }
|
|||
wgpu_bindings = { path = "../../../../gfx/wgpu_bindings", optional = true }
|
||||
mapped_hyph = { git = "https://github.com/jfkthame/mapped_hyph.git", tag = "v0.3.0" }
|
||||
remote = { path = "../../../../remote", optional = true }
|
||||
fog = { path = "../../../components/glean", optional = true }
|
||||
fog_control = { path = "../../../components/glean", optional = true }
|
||||
app_services_logger = { path = "../../../../services/common/app_services_logger" }
|
||||
http_sfv = { path = "../../../../netwerk/base/http-sfv" }
|
||||
unic-langid = { version = "0.8", features = ["likelysubtags"] }
|
||||
|
@ -100,8 +100,8 @@ webrtc = ["mdns_service"]
|
|||
wasm_library_sandboxing = ["rlbox_lucet_sandbox"]
|
||||
webgpu = ["wgpu_bindings"]
|
||||
remote_agent = ["remote"]
|
||||
glean = ["fog"]
|
||||
glean_with_gecko = ["fog/with_gecko"]
|
||||
glean = ["fog_control"]
|
||||
glean_with_gecko = ["fog_control/with_gecko"]
|
||||
rust_fxa_client = ["firefox-accounts-bridge"]
|
||||
with_dbus = ["audio_thread_priority/with_dbus"]
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ extern crate encoding_glue;
|
|||
#[cfg(feature = "rust_fxa_client")]
|
||||
extern crate firefox_accounts_bridge;
|
||||
#[cfg(feature = "glean")]
|
||||
extern crate fog;
|
||||
extern crate fog_control;
|
||||
extern crate gkrust_utils;
|
||||
extern crate http_sfv;
|
||||
extern crate jsrust_shared;
|
||||
|
|
Загрузка…
Ссылка в новой задаче