ci: generate Windows-on-ARM bindings on a windows-11-arm runner#267
Draft
CGMossa wants to merge 1 commit into
Draft
ci: generate Windows-on-ARM bindings on a windows-11-arm runner#267CGMossa wants to merge 1 commit into
CGMossa wants to merge 1 commit into
Conversation
Windows-ARM (aarch64-pc-windows-gnullvm) bindings do not ship yet, and bindgen was detached from the crate in extendr#250 so build.rs can no longer generate them. Supersedes the cross-compile approach in extendr#225, which predates the detach and relied on the now-removed CI emit machinery. - build.rs: handle the aarch64 arch on Windows in get_r_library instead of panicking ("Unknown architecture"), so the crate can build on Windows-ARM once a bindings file exists. - new workflow (workflow_dispatch): regenerate the bindings natively on a windows-11-arm runner (GA 2025-08-07, free for public repos), pinning the last pre-detach generator commit for build.rs, then validate with the layout tests and upload the artifact to commit by hand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
TODO: replace this line with your own framing, in your own voice.
AI-written details
Summary
aarch64-pc-windows-gnullvm) bindings support, whichextendr/libR-sysdoes not ship today.build.rs:get_r_librarynow handles theaarch64arch on Windows (maps tobin/x64) instead of panicking with "Unknown architecture", so the crate can build on Windows-ARM once a bindings file exists.workflow_dispatchworkflowgenerate-windows-arm-bindings.yml: regenerates the bindings natively on awindows-11-armrunner (GA 2025-08-07, free for public repos), pins the last pre-detach generator commit forbuild.rsto drive bindgen, validates with the layout tests, and uploads the result as an artifact.bindgenfor next release #250) and relied on CI emit machinery that has since been removed.Why a generation workflow instead of finishing #225
bindgenfor next release #250, sobuild.rsno longer has agenerate_bindingspath and the oldpr_generated_bindings/ artifact-emit CI flow is vestigial. The cross-compile-on-x86 approach in Add Windows ARM bindings #225 can no longer produce a file in-tree.windows-11-armrunner avoids cross-sysroot wrangling entirely (the part where Add Windows ARM bindings #225 stalled), and lets the layout tests actually execute on the target rather than being skipped.Test plan
bindgenbuild and the layout-test step both pass on thewindows-11-armrunner.bindings-windows-aarch64artifact, commit it intobindings/, and add thebindings-windows-aarch64.rssymlink (mirroring the other targets).cargo buildforaarch64-pc-windows-gnullvmpicks up the committed file viaretrieve_prebuild_bindings.Notes
bin/x64) and the exactaarch64Rtools toolchain path. Both are isolated and easy to adjust if the first run disagrees.workflow_dispatchinput so it can be bumped without editing the workflow.Drafted by Claude (claude-opus-4-8). Reviewed by the author.