Skip to content

Commit

Permalink
Update to UniFFI 0.23
Browse files Browse the repository at this point in the history
This adopts the new crate layout and only directly depends on the
`uniffi` crate.
Everything else is a transitive dependency. This hopefully reduces the
amount of churn and coordination needed when uniffi_* crates are updated.
  • Loading branch information
badboy committed Jan 17, 2023
1 parent d11c818 commit c6239c3
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 31 deletions.
51 changes: 27 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Cargo.toml
Expand Up @@ -20,3 +20,10 @@ default-members = [
opt-level = "s"
debug = false
lto = true

[patch.crates-io]
uniffi = { git = "https://github.com/mozilla/uniffi-rs" }
uniffi_core = { git = "https://github.com/mozilla/uniffi-rs" }
uniffi_bindgen = { git = "https://github.com/mozilla/uniffi-rs" }
uniffi_testing = { git = "https://github.com/mozilla/uniffi-rs" }
uniffi_build = { git = "https://github.com/mozilla/uniffi-rs" }
5 changes: 2 additions & 3 deletions glean-core/Cargo.toml
Expand Up @@ -41,8 +41,7 @@ zeitstempel = "0.1.0"
crossbeam-channel = "0.5"
thiserror = "1.0.4"
whatsys = "0.1.2"
uniffi = "0.22.0"
uniffi_macros = "0.22.0"
uniffi = { version = "0.22.0", default-features = false }
time = "0.1.40"
remove_dir_all = "0.5.3"
env_logger = { version = "0.9.0", default-features = false, optional = true }
Expand All @@ -60,7 +59,7 @@ iso8601 = "0.4"
ctor = "0.1.12"

[build-dependencies]
uniffi_build = { version = "0.22.0", features = ["builtin-bindgen"] }
uniffi = { version = "0.22.0", default-features = false }

[features]
# Increases the preinit queue limit to 10^6
Expand Down
2 changes: 1 addition & 1 deletion glean-core/build.rs
@@ -1,3 +1,3 @@
fn main() {
uniffi_build::generate_scaffolding("./src/glean.udl").unwrap();
uniffi::generate_scaffolding("./src/glean.udl").unwrap();
}
2 changes: 1 addition & 1 deletion glean-core/src/lib.rs
Expand Up @@ -975,7 +975,7 @@ pub fn glean_enable_logging_to_fd(_fd: u64) {
#[allow(missing_docs)]
mod ffi {
use super::*;
uniffi_macros::include_scaffolding!("glean");
uniffi::include_scaffolding!("glean");

type CowString = Cow<'static, str>;

Expand Down
2 changes: 1 addition & 1 deletion tools/embedded-uniffi-bindgen/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false
[dependencies]
anyhow = "1"
camino = "1.1.1"
uniffi_bindgen = { version = "0.22.0", default-features = false }
uniffi = { version = "0.22.0", default-features = false }
2 changes: 1 addition & 1 deletion tools/embedded-uniffi-bindgen/src/main.rs
Expand Up @@ -6,7 +6,7 @@ use std::env;

use anyhow::{bail, Context};
use camino::Utf8PathBuf;
use uniffi_bindgen::generate_bindings;
use uniffi::generate_bindings;

fn main() -> anyhow::Result<()> {
let mut args = env::args().skip(1);
Expand Down

0 comments on commit c6239c3

Please sign in to comment.