From 0420c366e6520651299d9bf050120b11361b2893 Mon Sep 17 00:00:00 2001 From: Yin Jifeng Date: Thu, 23 Nov 2023 15:57:07 +0800 Subject: [PATCH] fix: lib_name should replace hyphens --- src/commands/package.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/package.rs b/src/commands/package.rs index 1cd12fc..1afddb3 100644 --- a/src/commands/package.rs +++ b/src/commands/package.rs @@ -137,15 +137,16 @@ fn run_for_crate( } } + let crate_name = lib.name.replace("-", "_"); for target in &targets { - build_with_output(target, &lib.name, mode, lib_type, config)?; + build_with_output(target, &crate_name, mode, lib_type, config)?; } - generate_bindings_with_output(&targets, &lib.name, mode, lib_type, config)?; + generate_bindings_with_output(&targets, &crate_name, mode, lib_type, config)?; recreate_output_dir(&package_name).expect("Could not create package output directory!"); - create_xcframework_with_output(&targets, &lib.name, &package_name, mode, lib_type, config)?; - create_package_with_output(&package_name, &lib.name, config)?; + create_xcframework_with_output(&targets, &crate_name, &package_name, mode, lib_type, config)?; + create_package_with_output(&package_name, &crate_name, config)?; Ok(()) }