Fix cargo dist for musl and Windows platforms#48
Open
junzis wants to merge 1 commit intoxoolive:masterfrom
Open
Fix cargo dist for musl and Windows platforms#48junzis wants to merge 1 commit intoxoolive:masterfrom
junzis wants to merge 1 commit intoxoolive:masterfrom
Conversation
- Make rtl-sdr-rs optional in rs162 (behind rtlsdr feature). It was a non-optional dependency that pulled in libusb1-sys but was never directly imported — only desperado/rtlsdr uses the hardware. - Add x86_64-unknown-linux-musl and x86_64-pc-windows-msvc targets - Drop rtlsdr and mqtt from dist features since they require system libraries (libusb, paho-mqtt C lib) unavailable on musl/Windows. Users with SDR hardware can build from source. - Keep ssh feature in dist (works on all platforms via openssl) - Add build.rs with MSVC stack size (8 MB) from jet1090 - Add openssl as apt/homebrew/chocolatey dependency for SSH support Closes xoolive#9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #9 and supersedes #8.
rtl-sdr-rsoptional in rs162 — it was a non-optional dependency pulling inlibusb1-sysbut never directly imported (onlydesperado/rtlsdruses the hardware). This was the root cause of the musl build failure.x86_64-unknown-linux-musl,x86_64-pc-windows-msvcrtlsdrandmqttfrom dist features — they require system C libraries (libusb,paho-mqtt) unavailable on musl/Windows. Users with SDR hardware build from source.sshfeature in dist (works everywhere via openssl)build.rswith MSVC 8MB stack size (from jet1090)apt,homebrew,chocolatey)Changes
crates/rs162/Cargo.tomlrtl-sdr-rs→ optional, gated behindrtlsdrfeaturedist-workspace.tomlcrates/ship162/build.rsTest plan
cargo check --features ssh— builds without libusbcargo check --features ssh,rtlsdr— rtlsdr still works when enabledcargo clippy --features ssh— zero warningslibusb1-sysis completely absent from dep tree withoutrtlsdrfeaturepr-run-mode = "upload")