diff --git a/Cargo.toml b/Cargo.toml index 9a879ce..c64a62b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,8 +16,8 @@ name = "bdkffi" [dependencies] bdk = { version = "0.20", features = ["all-keys", "use-esplora-ureq", "sqlite-bundled"] } -uniffi_macros = { version = "0.16.0", features = ["builtin-bindgen"] } -uniffi = { version = "0.16.0", features = ["builtin-bindgen"] } +uniffi_macros = { version = "0.19.3", features = ["builtin-bindgen"] } +uniffi = { version = "0.19.3", features = ["builtin-bindgen"] } [build-dependencies] -uniffi_build = { version = "0.16.0", features = ["builtin-bindgen"] } +uniffi_build = { version = "0.19.3", features = ["builtin-bindgen"] } diff --git a/bdk-ffi-bindgen/Cargo.toml b/bdk-ffi-bindgen/Cargo.toml index 7c12400..71d1a42 100644 --- a/bdk-ffi-bindgen/Cargo.toml +++ b/bdk-ffi-bindgen/Cargo.toml @@ -3,9 +3,8 @@ name = "bdk-ffi-bindgen" version = "0.2.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] anyhow = "=1.0.45" # remove after upgrading to next version of uniffi structopt = "0.3" -uniffi_bindgen = "0.16.0" +uniffi_bindgen = "0.19.3" +camino = "1.0.9" diff --git a/bdk-ffi-bindgen/src/main.rs b/bdk-ffi-bindgen/src/main.rs index 4b320df..a2748bf 100644 --- a/bdk-ffi-bindgen/src/main.rs +++ b/bdk-ffi-bindgen/src/main.rs @@ -2,6 +2,7 @@ use std::fmt; use std::path::{Path, PathBuf}; use std::str::FromStr; use structopt::StructOpt; +use camino::Utf8Path; #[derive(Debug, PartialEq)] pub enum Language { @@ -44,11 +45,13 @@ impl FromStr for Language { } fn generate_bindings(opt: &Opt) -> anyhow::Result<(), anyhow::Error> { + let path: &Utf8Path = Utf8Path::from_path(&opt.udl_file).unwrap(); + let out_dir: &Utf8Path = Utf8Path::from_path(&opt.out_dir).unwrap(); uniffi_bindgen::generate_bindings( - &opt.udl_file, + path, None, vec![opt.language.to_string().as_str()], - Some(&opt.out_dir), + Some(out_dir), false, )?;