Skip to content

WIP: arm64 windows CI leg - #2

Closed
JohnCampionJr wants to merge 3 commits into
windows-masterfrom
windows-arm
Closed

WIP: arm64 windows CI leg#2
JohnCampionJr wants to merge 3 commits into
windows-masterfrom
windows-arm

Conversation

@JohnCampionJr

@JohnCampionJr JohnCampionJr commented Aug 25, 2026

Copy link
Copy Markdown

User description

Proving an ARM64 Windows CI leg in the fork before offering it upstream. Not for merge as-is.


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Expand the Windows GitHub Actions job to validate both x86-64 and ARM64 runners. Configure clang-cl for ARM64 C dependencies so aws-lc-sys assembles correctly while remaining ABI-compatible with the MSVC-linked Rust build.

TopicDetails
ARM64 CI coverage Add an ARM64 Windows CI matrix leg while preserving x86-64 coverage, and label each run by architecture.
Modified files (1)
  • .github/workflows/rust-windows.yml
Latest Contributors(1)
UserCommitDate
john@brightshore.ioWIP: report the clang-...August 25, 2026
C toolchain setup Configure clang-cl discovery, fallback installation, and environment variables for ARM64 native dependency builds.
Modified files (1)
  • .github/workflows/rust-windows.yml
Latest Contributors(1)
UserCommitDate
john@brightshore.ioWIP: report the clang-...August 25, 2026
Review this PR on Baz | Customize your next review

Summary by Sourcery

Add an ARM64 Windows CI leg while preserving existing x86-64 validation.

New Features:

  • Add Windows ARM64 coverage to the GitHub Actions workflow alongside existing x86-64 coverage.

Enhancements:

  • Configure ARM64 Windows builds to use a compatible C/C++ compiler for native dependencies.

CI:

  • Run Windows x86-64 and ARM64 jobs independently with architecture-specific runner selection and job names.

josh-proxy and the josh / josh-filter CLIs do not build on Windows: unix-only
code is compiled unconditionally (issue josh-project#2235). Nothing here changes unix
behavior.

- josh-gix-ext: add component_bytes, the portable form of the path-component
  conversion used to match git tree entry names. On unix an OsStr is already
  bytes; on Windows tree names are conventionally UTF-8, so the UTF-8 encoding
  is the equivalent, and a component that is not valid Unicode panics rather
  than silently matching something else. josh-gix-ext, josh-search and
  josh-core all used std::os::unix::ffi::OsStrExt::as_bytes for this. (rustc
  suggests std::os::windows::prelude::OsStrExt here, which is not equivalent:
  that trait yields UTF-16 code units, not bytes.) josh-search gains
  josh-gix-ext as a dependency; it was already in its build graph via josh-core
  and in its dev-dependencies.
- josh-core: write .gitmodules with LF on every platform. gix-config writes the
  platform's newline, and the result becomes a blob, so the same filter applied
  to the same input produced different objects on Windows than elsewhere.
- josh-rpc: gate the tokio_fd module behind cfg(unix). It wraps raw fds with
  libc for the SSH shell; josh-proxy itself only uses josh_rpc::calls, which is
  plain serde types. This is the first compile error (E0433).
- josh-proxy: split serve_namespace cfg(unix)/cfg(not(unix)). SSH serving
  passes git stdio through unix sockets created by josh-ssh-shell, so non-unix
  builds return an "unsupported on this platform" error from that endpoint
  instead of failing to compile. HTTP serving is unaffected.
- josh-proxy: install hooks portably. Symlink on unix (unchanged), sh shim on
  Windows, where symlinking needs elevated privileges. Hook mode is dispatched
  by argv[0], which a shim cannot fake for a native executable, so the shim
  names the hook in JOSH_PROXY_HOOK, read once and only on Windows. The shim
  runs an absolute, quoted path: git runs hooks with GIT_DIR as the working
  directory. The hooks directory is created with fs::create_dir_all rather than
  shelling out to mkdir, which is not an executable on Windows.
- josh-proxy: bind the listener dual-stack, in make_listener. A bare [::]
  socket accepts IPv4 on Linux (bindv6only defaults off) but is v6-only on
  Windows: the proxy starts, logs its address and looks healthy while every
  client dialing 127.0.0.1 is refused.
- josh-cli: refuse `josh compose` on Windows, where podman is not supported,
  rather than inventing a uid/gid for it.
- josh-cli: build valid file:// URLs from local paths with dunce::canonicalize.
  std's returns an extended-length path, which git rejects inside a file:// URL
  — issue josh-project#2288.
- Two tests are gated to unix: one identifies a ref file by inode, and one
  builds a ref path containing a reserved Windows device name, which Windows
  cannot represent at all.

Adds a Windows CI job in its own workflow, leaving rust.yml untouched. It
builds the supported binaries, runs the unit tests of the crates that build
there with nextest, and runs functional tests against the built binaries:
tests/windows/cli.sh drives the CLI against a local repository, and
tests/windows/proxy.sh drives josh-proxy through a filtered clone, a pinned-SHA
fetch, a reverse-filter push and reuse of its cache across a restart, with
relative and space-laden cache paths as separate cases. josh-proxy needs an
http upstream, so tests/windows/serve-git.ps1 hosts git http-backend behind
HttpListener; the job installs nothing that Windows does not ship.

Adds docs/src/contributing/windows.md: setup, build, and the limitations.

Everything above passes on Windows x86-64 and ARM64, and on macOS and Linux.

Change: windows-support
Assisted-By: anthropic/claude-fable-5
Assisted-By: anthropic/claude-opus-5
Assisted-By: anthropic/claude-opus-5
@sourcery-ai

sourcery-ai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a proof-of-concept ARM64 Windows CI leg alongside the existing x86-64 leg, using a matrix of Windows runners and configuring clang-cl for ARM64 C dependencies that are incompatible with MSVC assembly.

File-Level Changes

Change Details Files
Expand the Windows workflow into architecture-specific CI legs.
  • Replace the single Windows runner with a non-failing matrix covering x86-64 and ARM64.
  • Use architecture-specific runner labels and job names while preserving the draft pull-request guard.
  • Keep matrix legs independent so one failure does not cancel the other.
.github/workflows/rust-windows.yml
Configure clang-cl for ARM64 native C dependency builds.
  • Conditionally locate an existing clang-cl installation or install LLVM with Chocolatey.
  • Add the discovered compiler directory to PATH and set CC/CXX to clang-cl for the ARM64 leg.
  • Use clang-cl to assemble GNU-syntax aws-lc-sys code while retaining MSVC-compatible linking.
.github/workflows/rust-windows.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 40ec81f9-8a68-43f7-bfbc-d42146054b61

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Assisted-By: anthropic/claude-opus-5
@JohnCampionJr

Copy link
Copy Markdown
Author

Proven; folded into josh-project#2512.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant