Skip to content

Commit

Permalink
Use different binding dirs for different uniffi modules (#2348)
Browse files Browse the repository at this point in the history
Fixes #2347
  • Loading branch information
messense authored Dec 1, 2024
1 parent 851f3f7 commit 35de23b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/module_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ fn uniffi_bindgen_command(crate_dir: &Path) -> Result<Command> {
fn generate_uniffi_bindings(
crate_dir: &Path,
target_dir: &Path,
module_name: &str,
target_os: Os,
artifact: &Path,
) -> Result<UniFfiBindings> {
Expand All @@ -1038,6 +1039,7 @@ fn generate_uniffi_bindings(
.normalize()?
.join("maturin")
.join("uniffi")
.join(module_name)
.into_path_buf();
fs::create_dir_all(&binding_dir)?;

Expand Down Expand Up @@ -1154,7 +1156,7 @@ pub fn write_uniffi_module(
names: binding_names,
cdylib,
path: binding_dir,
} = generate_uniffi_bindings(crate_dir, target_dir, target_os, artifact)?;
} = generate_uniffi_bindings(crate_dir, target_dir, module_name, target_os, artifact)?;

let py_init = binding_names
.iter()
Expand Down

0 comments on commit 35de23b

Please sign in to comment.