Add AArch64 Windows build support and fix related CI failures - #2
Merged
Conversation
Co-authored-by: lzlrd <24303423+lzlrd@users.noreply.github.com>
Co-authored-by: lzlrd <24303423+lzlrd@users.noreply.github.com>
Copilot
AI
changed the title
Add AArch64 build support
Fix ARM64 Windows build and clippy lifetime lint
Mar 1, 2026
Co-authored-by: lzlrd <24303423+lzlrd@users.noreply.github.com>
Copilot
AI
changed the title
Fix ARM64 Windows build and clippy lifetime lint
Add AArch64 Windows build support and fix related CI failures
Mar 1, 2026
lzlrd
marked this pull request as ready for review
March 1, 2026 01:22
Closed
There was a problem hiding this comment.
Pull request overview
Adds AArch64 (ARM64) build support to the project’s CI/release pipeline and updates the Windows bridge implementation to work on ARM64 runners by bumping the windows crate and adjusting affected API calls.
Changes:
- Add CI jobs to build Windows + PAM artifacts for AArch64 and package them into a separate
release-aarch64.tar.gz. - Bump
windowscrate0.32 → 0.39and update WinRT/Win32 call sites for the new signatures. - Replace manual
stripinvocations with Cargo’s[profile.release] strip = "symbols"; address a new clippy lifetime-syntax lint.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
wsl_hello_pam/src/auth.rs |
Updates Cow lifetime syntax to satisfy new clippy linting. |
win_hello_bridge/src/creator.rs |
Adapts WinRT APIs to windows 0.39 (HSTRING / IBuffer borrowing changes). |
win_hello_bridge/src/authenticator.rs |
Adapts WinRT/Win32 calls to windows 0.39 and updates FindWindowW usage. |
win_hello_bridge/Cargo.toml |
Bumps windows dependency to 0.39 and removes the alloc feature. |
Makefile |
Removes explicit strip calls now that stripping is handled by Cargo. |
Cargo.toml |
Enables release stripping via strip = "symbols". |
Cargo.lock |
Adds/updates lockfile for the workspace after dependency changes. |
.github/workflows/cicd.yaml |
Adds AArch64 build jobs and packages/upload AArch64 release artifacts. |
Comments suppressed due to low confidence (3)
win_hello_bridge/src/authenticator.rs:22
- Similar to
creator.rs, this call allocates a newHSTRINGfromkey_nameinline. Consider creating theHSTRINGonce near the start ofverify_userand reusing it forOpenAsync(and any other WinRT calls) to reduce allocations and keep the parameter handling consistent.
let key = {
let result = KeyCredentialManager::OpenAsync(&HSTRING::from(key_name))?.get()?;
FailureReason::from_credential_status(result.Status()?, key_name)?;
win_hello_bridge/src/creator.rs:24
HSTRING::from(key_name)is being re-created multiple times within a single call (forRequestCreateAsyncand again in theCredentialExistsbranch). Consider convertingkey_nameto anHSTRINGonce (e.g.,let key_name_h = HSTRING::from(key_name);) and reusing a borrowed reference to reduce allocations and simplify the code.
let result = KeyCredentialManager::RequestCreateAsync(
&HSTRING::from(key_name),
KeyCredentialCreationOption::FailIfExists,
)?
.get()?;
match FailureReason::from_credential_status(result.Status()?, key_name) {
Ok(()) => result
.Credential()?
.RetrievePublicKeyWithDefaultBlobType()?,
Err(FailureReason::CredentialExists) => {
let result = KeyCredentialManager::OpenAsync(&HSTRING::from(key_name))?.get()?;
FailureReason::from_credential_status(result.Status()?, key_name)?;
win_hello_bridge/src/authenticator.rs:49
class_nameis allocated as anHSTRINGon every iteration of this polling loop. Since the class name is constant, movelet class_name = HSTRING::from(...)outside the loop to avoid repeated allocations while waiting for the window to appear.
let hwnd = loop {
let class_name = HSTRING::from("Credential Dialog Xaml Host");
let hwnd = unsafe { FindWindowW(&class_name, PCWSTR::null()) };
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Adds CI jobs for AArch64 targets (
windows-11-arm,ubuntu-24.04-arm) and fixes three issues that surfaced as a result.CI workflow
build-windows-binary-aarch64(windows-11-arm) andbuild-pam-module-aarch64(ubuntu-24.04-arm)release-aarch64.tar.gzwindowscrate: 0.32 → 0.39windows_aarch64_msvc-0.32.0ships an x64-compiledwindows.lib, causing link errors on the ARM64 runner. 0.39 ships a correct ARM64 library. API adaptations required by the bump:allocfeature removed — dropped fromCargo.toml&HSTRINGinstead of&strIBufferparams now require a borrow (&buffer)FindWindowWtakes&HSTRING+PCWSTR::null()instead of&str+PWSTR(null_mut())HWNDnull check viahwnd.0 != 0(.ok()removed)Strip handling
GNU
stripon thewindows-11-armrunner can't process ARM64 PE binaries. Removed the explicitstripcalls from the Makefile for both targets and replaced with cargo's built-instrip = "symbols"in[profile.release], which uses the correct platform-native mechanism.Clippy
New
mismatched_lifetime_syntaxeslint:Cow<str>→Cow<'_, str>inwsl_hello_pam/src/auth.rs.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.