Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ clap = { version = "4.0.0", features = [
clap_complete_command = { version = "0.6.1", optional = true }

# cross compile
cargo-zigbuild = { version = "0.22.0", default-features = false, optional = true }
cargo-zigbuild = { version = "0.22.1", default-features = false, optional = true }
cargo-xwin = { version = "0.19.2", default-features = false, optional = true }
xz2 = { version = "0.1", optional = true }

Expand Down
17 changes: 16 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ fn pep517(subcommand: Pep517Command) -> Result<()> {
fn run() -> Result<()> {
#[cfg(feature = "zig")]
{
// Allow symlink `maturin` to `ar` to invoke `zig ar`
// Allow symlink `maturin` to various tool names to invoke zig wrappers
// See https://github.com/messense/cargo-zigbuild/issues/52
let mut args = env::args();
let program_path = PathBuf::from(args.next().expect("no program path"));
Expand All @@ -380,6 +380,21 @@ fn run() -> Result<()> {
};
zig.execute()?;
return Ok(());
} else if program_name.eq_ignore_ascii_case("lib") {
let zig = Zig::Lib {
args: args.collect(),
};
zig.execute()?;
return Ok(());
} else if program_name.to_string_lossy().ends_with("dlltool") {
let zig = Zig::Dlltool {
args: args.collect(),
};
zig.execute()?;
return Ok(());
} else if program_name.eq_ignore_ascii_case("install_name_tool") {
cargo_zigbuild::macos::install_name_tool::execute(args)?;
return Ok(());
}
}

Expand Down
Loading