-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add Windows 7 builds with custom packaging #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Athemis
wants to merge
3
commits into
main
Choose a base branch
from
feature/cargo-dist-win7
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Athemis/ELNPack
Length of output: 80
🏁 Script executed:
Repository: Athemis/ELNPack
Length of output: 174
🏁 Script executed:
Repository: Athemis/ELNPack
Length of output: 106
🏁 Script executed:
Repository: Athemis/ELNPack
Length of output: 405
🏁 Script executed:
# Read full dist-workspace.toml to understand the build setup cat -n dist-workspace.tomlRepository: Athemis/ELNPack
Length of output: 3123
🏁 Script executed:
# Check rust-toolchain.toml configuration cat -n rust-toolchain.tomlRepository: Athemis/ELNPack
Length of output: 145
🏁 Script executed:
Repository: Athemis/ELNPack
Length of output: 2076
🏁 Script executed:
Repository: Athemis/ELNPack
Length of output: 1343
🌐 Web query:
Rust tier-3 targets x86_64-win7-windows-msvc i686-win7-windows-msvc build-std nightly💡 Result:
Short answer: those two targets are Tier 3 and Rust does not ship prebuilt std for them — build with nightly + -Z build-std or build rustc with the targets enabled. Example commands and important notes below.
What they are
Option A — use nightly + cargo -Z build-std (quicker)
cargo +nightly build -Z build-std=std,core,alloc --target x86_64-win7-windows-msvc --release
(replace x86_64... with i686-win7-windows-msvc as needed). [1][2]
Option B — build rustc with the target (full, reproducible)
[build]
build-stage = 1
target = ["x86_64-win7-windows-msvc"]
And set target-specific linker/cc if cross-compiling. Then build rustc. [1]
References
If you want, tell me your host OS and whether you’ll cross-compile from Linux or Windows and I’ll give the exact toolchain/linker/Windows SDK steps and the precise cargo command for i686 or x86_64.
🌐 Web query:
Rust -Z build-std flag stability documentation tier-3 targets💡 Result:
Short answer: -Z build-std is an unstable (nightly-only) Cargo flag that tells Cargo to compile the Rust standard-library crates from source (requires the rust-src component, a nightly toolchain, and passing --target). It's commonly used when targeting tier‑3 triples (which Rust does not ship prebuilt std for), because tier‑3 targets often require you to build your own std. See the Cargo unstable docs for details and the rustc platform-support docs for the tier‑3 definition. [1][2]
Key points:
Sources:
[1] Cargo “Unstable Features” (–Z build-std) documentation.
[2] rustc Platform Support — Target tiers (Tier 3 explanation).
Verify tier-3 target viability and PowerShell script robustness.
Your approach demonstrates commendable initiative in resurrecting Windows 7 support through custom build artifacts. However, several matters require attention:
Primary Concerns:
Tier-3 Target Stability: The targets
x86_64-win7-windows-msvcandi686-win7-windows-msvcare confirmed as Rust tier-3 targets with no prebuilt standard library. They require the nightly toolchain and the unstable-Z build-stdflag. While this is the correct and documented approach for these targets, ensure your CI infrastructure is prepared for potential breakage when nightly updates introduce incompatibilities or when dependencies behave differently under nightly.PowerShell Script Robustness: While
$ErrorActionPreference = "Stop"provides baseline error handling, consider adding explicit error handling around the cargo build commands (lines 43, 56). Cargo build failures can surface in unexpected ways, and defensive checks would improve reliability.Nightly Toolchain Risk: Your project uses stable by default (rust-toolchain.toml), which is sensible, but this build requires dynamically installing nightly on each CI run. Document and communicate to contributors that this extra-artifact build carries the inherent risk of nightly toolchain instability.