Skip to content

Commit

Permalink
Use the default Binding Generator
Browse files Browse the repository at this point in the history
The swift binding generator doesn't seem to take into consideration the
uniffi.toml file when generating the configuration. Use the default
generator instead, while explicitly specifying swift as targeted
language.
  • Loading branch information
neacsu committed Apr 3, 2024
1 parent ddbdbcc commit d1e4d58
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::fs::{self, create_dir};

use crate::Result;
use camino::Utf8Path;
use uniffi_bindgen::bindings::swift::gen_swift::SwiftBindingGenerator;
use uniffi_bindgen::{bindings::TargetLanguage, BindingGeneratorDefault};

use crate::recreate_dir;

Expand All @@ -19,7 +19,10 @@ pub fn generate_bindings(lib_path: &Utf8Path, crate_name: &str) -> Result<()> {
uniffi_bindgen::library_mode::generate_bindings(
lib_path,
Some(crate_name.to_owned()),
&SwiftBindingGenerator {},
&BindingGeneratorDefault {
target_languages: vec![TargetLanguage::Swift],
try_format_code: false,
},
None,
out_dir,
false,
Expand Down

0 comments on commit d1e4d58

Please sign in to comment.