fix(publish): fix crates.io publishing for static-linked -sys crates#375
Merged
DorianZheng merged 3 commits intomainfrom Mar 13, 2026
Merged
fix(publish): fix crates.io publishing for static-linked -sys crates#375DorianZheng merged 3 commits intomainfrom
DorianZheng merged 3 commits intomainfrom
Conversation
- Remove rustc-link-lib directives from stub mode in libgvproxy-sys and libkrun-sys. Stub mode emitting link-lib without a real .a file causes cargo publish verification to fail with "could not find native static library". - Add set -euo pipefail to CI publish script. Previously, piping through tee swallowed cargo publish exit codes, silently hiding failures. - Use --no-verify for all -sys crates since vendor sources are excluded from the package. The real build succeeds in the build job before publishing. - Bump workspace version to 0.7.1 (libkrun-sys 0.7.0 on crates.io has old feature names incompatible with current code).
Add .cargo_vcs_info.json detection to all -sys crate build scripts. When downloaded from crates.io, vendor/Go sources are excluded from the package so building from source is impossible. Auto-entering stub mode prevents panics and lets boxlite's prebuilt runtime download handle everything. Bump to 0.7.2 since 0.7.1 was published without this fix.
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
libgvproxy-sysandlibkrun-sysstub mode emittingrustc-link-libwithout a real.afile, causingcargo publishverification to failset -euo pipefailto CI publish script — previouslyteeswallowedcargo publishexit codes, silently hiding the v0.7.0 publish failures--no-verifyfor all-syscrates since vendor sources are excluded from the package.cargo_vcs_info.jsonauto-detection to all-syscrate build scripts so they enter stub mode when downloaded from crates.io (prevents panics on missing vendor sources)Context
The v0.7.0 release CI silently failed to publish
libgvproxy-sysandboxliteto crates.io (run #23006800445). All 6 crates have been manually republished at 0.7.2 and verified with a standalone Rust example project.Test plan
BOXLITE_DEPS_STUB=1 cargo check -p libgvproxy-syspassesBOXLITE_DEPS_STUB=1 cargo check -p libkrun-syspassesBOXLITE_DEPS_STUB=1 cargo publish -p libgvproxy-sys --dry-runpackaging succeedsboxlite-rust-examplebuilds cleanly withboxlite = "0.7.2"from crates.ioBOXLITE_RUNTIME_URLpointing to v0.7.0 release tarballs