kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
423 stars 50 forks source link

Add cargo-build override (support `zigbuild`) #51

Closed oldgalileo closed 2 years ago

oldgalileo commented 2 years ago

We have a use case for using zigbuild alongside cargo-deb to lock the glibc version. This integration appears to be almost seamless, as zigbuild supports most (maybe all?) of cargo-build's build flags.

By keeping cargo-build the default, we don't run the risk of having to include dependency management for the cargo-zigbuild binary, nor do we have to worry about current behavior changing in regards to the target triplet (zigbuild adds the glibc version to the end of the triplet such that it would look like: aarch64-unknown-linux-gnu-2.17, and thus the ABI would be linux-gnu-2.17. This won't break any existing mapping for the debian architectures, only custom behavior built upon the fallback case.)

kornelski commented 2 years ago

Thanks.

ximon18 commented 2 years ago

@oldgalileo: Could you also please submit an update to the README noting the new cargo-build command line argument?

oldgalileo commented 2 years ago

@ximon18 would you prefer a separate PR or to re-open this here?

ximon18 commented 2 years ago

@oldgalileo: I don't know what @kornelski prefers, perhaps cleanest would be to re-open the PR, but I'm fine either way as long as the new command line argument gets added to the documentation ;-) Ideally it would also get mentioned in release notes or a change log but this project doesn't seem to do either.