Skip to content

Build and verify Skippy CPU runtimes for Windows ARM64 - #248

Merged
i386 merged 4 commits into
mainfrom
port/mesh-3077-windows-arm64
Nov 28, 2026
Merged

i386 merged 4 commits into
mainfrom
port/mesh-3077-windows-arm64

Conversation

@i386

@i386 i386 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Original problem

Standalone Windows source builds selected x64, and a target label alone cannot establish that a bundled DLL uses the requested architecture. Windows ARM64 users need a source-built CPU runtime alongside the ARM64 CLI.

Ported from Mesh #3077 for the Skippy cutover.

Diagnostics

The release verifier exercises ARM64 PE fixtures covering the primary DLL, an executable tool, and a manifest-declared helper. It rejects x64 images substituted in any of those positions even when the checksums match the substituted bytes.

Fix

Select the native Windows architecture by default, support ARM64 source builds from either host architecture, initialize the matching MSVC environment, and build the CPU runtime with Clang. Verify the PE machine for every packaged binary. Resolve the selected Windows triple consistently across MSVC, Cargo and packaging. Full CI and releases build the Windows ARM64 CPU product on the hosted ARM64 image, check its provenance and archive contents, and publish the verified archive without executing smoke. GitHub ARM64 runner image

Usage

Run from PowerShell with the ARM64 MSVC tools, Clang, and the ARM64 Rust target installed.

scripts/build-windows.ps1 -Backend cpu -TargetArch arm64

Illustrative output for the default Cargo target directory.

Built Skippy: <checkout>\target\aarch64-pc-windows-msvc\debug\skippy.exe

Compatibility

Windows ARM64 is CPU-only. The source build puts the runtime beside the CLI in Cargo’s target-qualified directory. The new release entry uses package verification as its validation policy.

Validation

bash -n scripts/build-llama.sh, bash -n scripts/package-native-runtime.sh, git diff --check, and PYTHONPATH=scripts python3.12 scripts/tests/release_contracts.py passed. scripts/package-native-runtime.sh --backend cpu --target aarch64-pc-windows-msvc --out <fixture-out> --no-model-package-tool and python3.12 scripts/native-inspect.py verify-runtime-package <fixture-bundle> passed using a synthetic ARM64 input. The full and PR planner checks, 31 Node workflow tests, just automation-contracts, ShellCheck and git diff --check passed. The release inventory fixture verified ARM64 publication inputs with no smoke report. Local actionlint reported the existing release concurrency.queue key and passed with that unchanged diagnostic excluded. The hosted Windows ARM64 package build remains unverified.

Workflow changes

Shared CI

flowchart LR
  subgraph BeforeCI[Before]
    A[PR profile or full CI invocation] --> B[Plan and quality]
    B --> C[Selected package jobs and existing smoke]
    C --> D[CI gate]
  end
  subgraph AfterCI[After]
    E[PR profile or full CI invocation] --> F[Plan and quality]
    F --> G[Selected package jobs and existing smoke]
    F -->|Full profile| H[Windows ARM64 CPU package and verification]
    G --> I[CI gate]
    H -->|Product archive and job result| I
  end
Loading

Package action

flowchart LR
  subgraph BeforePackage[Before]
    A[Set up toolchain and restore source] --> B[Build or download verified CLI]
    B --> C[Build and verify runtime and compose archive]
    C --> D[Run configured smoke]
    D --> E[Upload product artifact]
  end
  subgraph AfterPackage[After]
    F[Set up toolchain and restore source] --> G[Build or download verified CLI]
    G --> H[Build and verify runtime and compose archive]
    H -->|Existing smoke modes| I[Run configured smoke]
    H -->|Windows ARM64 CPU| J[Upload product artifact]
    I --> J
  end
Loading

Release workflow

flowchart LR
  subgraph BeforeRelease[Before]
    A[Scheduled or dispatched release] --> B[Prepare candidate]
    B --> C[Full CI and qualification]
    C -->|Archives and smoke evidence| D[Verify release inventory]
    D -->|Verified assets| E[Protected publisher]
  end
  subgraph AfterRelease[After]
    F[Scheduled or dispatched release] --> G[Prepare candidate]
    G --> H[Full CI and qualification]
    H -->|Existing archives and smoke evidence| I[Verify release inventory]
    H -->|Windows ARM64 archive and provenance| I
    I -->|Verified assets| J[Protected publisher]
  end
Loading

Main CI fixes refreshed — c42417ba6a1c

Merged target main cc2a27435e798649a9cb938d600d39722e4a2263, including #254's separate queue/execution budgets and #256's formation-bound peer rendezvous, verified child listener readiness and control availability during preparation. Earlier split qualification failures included connection-refused/timeouts at the leader control port; those older results predate these shared fixes. Other merged CI fixes include Windows Vulkan path handling and the shared Windows GPU smoke workflow.

SKIPPY_PYTHON=/tmp/skippy-ci-repair/automation-venv312/bin/python just ci-automation passed on the merged tree, including deadline, peer identity, listener ownership, log streaming, reporting/publication and workflow contracts. git diff --check and git diff --cached --check passed. This is a normal base merge preserving the PR's feature changes; no additional Rust/native feature change was authored in this refresh. New exact-head source/package/device checks and native inference qualification are pending; earlier native results do not qualify this new head. The previous head remains available in history as 65f0c67df3124da9fe6634d647876f41cae3c612.

Acceptance criteria

  • I ran the relevant local checks, or explained why they do not apply.
  • I agree to license my contributions under the Apache License, Version 2.0.

Ported-from: Mesh-LLM/mesh-llm#3077

Source-commit: de604b9835c1a72065f7fe446d74d3bbf2f0d24d
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d336f4b4-d628-471b-8a16-1a1302b4122d
Commits

Reviewing files that changed from the base of the PR and between cc2a274 and c42417b.

Files selected for processing: 20

  • .agents/skills/manage-ci/SKILL.md
  • .github/actions/ci-package/action.yml
  • .github/scripts/ci-gate.test.cjs
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • CONTRIBUTING.md
  • Justfile
  • ci/README.md
  • ci/targets.json
  • scripts/build-llama.sh
  • scripts/build-windows.ps1
  • scripts/ci-plan.sh
  • scripts/ci-product.py
  • scripts/ci-release.py
  • scripts/enable-msvc-dev-env.ps1
  • scripts/lib/native_policy.py
  • scripts/native-inspect.py
  • scripts/package-cli-release.sh
  • scripts/package-native-runtime.sh
  • scripts/tests/release_contracts.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@i386

i386 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor Author

@i386 The required PR checks gate needs your licensing declaration. Please tick this checkbox in the PR description if you agree:

  • I agree to license my contributions under the Apache License, Version 2.0.

I have left this author declaration unchecked while working through CI.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Skippy Lab Qualification: Passed

Commit: c42417ba6a1c837922ea0e660d061d1b0db5da04 · PR smoke · Workflow and timings · Saved evidence

Native Spark lab qualification.

Latest successful main: run 45835599636, attempt 1, commit f243a305f497cbe5f897fdbe384235b0a62edf3f. Comparison unavailable: workload inputs changed or could not be verified.

Configuration Outcome Prefill tok/s Prefill vs main Decode tok/s Decode vs main Actions logs
qwen35-4b-standalone Passed 3869.2 Unavailable 64.4 Unavailable Logs
qwen3-coder-30b-a3b-standalone Passed 2833.3 Unavailable 86.0 Unavailable Logs
qwen3-coder-30b-a3b-split Passed 2172.6 Unavailable 55.2 Unavailable Logs
qwen36-35b-a3b-standalone Passed 1884.6 Unavailable 62.6 Unavailable Logs
qwen36-35b-a3b-split Passed 1856.1 Unavailable 41.4 Unavailable Logs
qwen38-flash-next-standalone Passed 734.8 Unavailable 30.3 Unavailable Logs
qwen38-flash-next-split Passed 521.6 Unavailable 25.5 Unavailable Logs

TPS comes from three separate warmed, uncached probes at concurrency 1, each generating exactly 128 tokens. The scored correctness answers and each probe's 64-token warmup are excluded. Each rate is total tokens / total server-reported phase time, not an average of request rates. Client elapsed times and raw responses are retained in throughput-probe.json. These bounded samples are not sustained benchmarks or controlled speedup comparisons. Legacy short-answer receipts and missing or invalid probe evidence show as Unavailable.

Deltas use unrounded rates from matching PR-profile smoke receipts on the latest successful main run, including the nightly smoke evidence. Positive means faster. Changed workload inputs, different serving host classes, unequal phase token counts or missing evidence show Unavailable. Physical Spark placement and runtime conditions can differ; deltas are descriptive, not controlled speedup claims.

Smoke checks cover GPU startup, deterministic endpoint repeats and bounded streaming. They do not establish an AgentX performance score. Nightly history and saved performance baselines are published separately; a saved baseline can be older than the latest successful main run used here. Native build and qualification output streams into each configuration’s Actions log, with per-attempt copies in Saved evidence. Any capture gaps are reported in the log and saved diagnostics. GitHub evidence copies expire after 30 days.

@i386 i386 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I reviewed target selection through the PowerShell wrapper, Cargo, native packaging, and the PE verifier. Please exercise an actual x64-to-ARM64 build and ARM64 startup after fixing target resolution.

Comment thread scripts/build-windows.ps1 Outdated
$targetDir = ($cargoMetadata | ConvertFrom-Json).target_directory
# Pass an explicit triple when crossing architectures. A native build
# keeps Cargo's ordinary layout unless the caller already selected a target.
if ($architecture -eq "arm64" -or $machineIsArm64 -or $env:CARGO_BUILD_TARGET) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[P2] Resolve Cargo and native packaging to the same target. On an x64 host with CARGO_BUILD_TARGET=aarch64-pc-windows-msvc, omitting -Target selects x64 from the OS and this block overwrites the caller's ARM64 target. A target set via Cargo's build.target config can also escape this block, letting Cargo build for that target while the wrapper packages x64 and prints an unqualified output path. Resolve one effective triple before initializing MSVC, honor or explicitly reject conflicting caller settings, and use that triple for both builds and the output directory.

michaelneale
michaelneale previously approved these changes Nov 28, 2026

@michaelneale michaelneale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve with qualification. Windows ARM64 CPU runtime build and verification. Validated with synthetic ARM64 PE fixtures and script syntax checks. Qualification open: real ARM64 build and model-backed inference are unverified. The PR body states this explicitly. No runtime ABI or wire changes. Reviewed by Glum on behalf of @mic.

Signed-off-by: James Dumay <james@generalinference.xyz>
Signed-off-by: James Dumay <james@generalinference.xyz>
@i386
i386 marked this pull request as ready for review November 28, 2026 01:20
@i386
i386 merged commit 151b919 into main Nov 28, 2026
115 checks passed
@i386
i386 deleted the port/mesh-3077-windows-arm64 branch November 28, 2026 20:55
Virgile-pct added a commit to Mesh-LLM/mesh-llm that referenced this pull request Nov 29, 2026
## Summary

Rebased onto the external Skippy dependency (#3193). The Skippy half of
this PR, the ARM64 CPU runtime and its packaging checks, now lives in
Mesh-LLM/skippy#248. What is left here is the host.

`scripts\build-windows.ps1 -TargetArch arm64` builds `mesh-llm` for
`aarch64-pc-windows-msvc`, cross-compiling from an x64 machine or
natively on Windows on ARM, where it is the default.

- **MSVC environment**: arm64 imports `vcvarsall amd64_arm64` (or
`arm64` on an ARM64 machine) and checks that `VSCMD_ARG_TGT_ARCH` really
is `arm64`. An x64 build re-imports `vcvars64` when the shell was left
targeting another architecture, since `cl`, `link` and `lib` are then on
`PATH` but build for ARM64.
- **clang**: Visual Studio's clang goes on `PATH` for the `ring` crate,
which compiles its aarch64 assembly with it.
- **cargo** gets `--target aarch64-pc-windows-msvc`, so the host lands
in `target\aarch64-pc-windows-msvc\<profile>`.
- The root `scripts\build-windows.ps1` forwards `-TargetArch`, and
CONTRIBUTING.md documents the command and the two Visual Studio
components it needs.

This PR builds on #3241 and uses its published Skippy v0.80.6 Windows
ARM64 CPU runtime. The installer, updater, and release workflow select
the native ARM64 package. Pinned CI includes a Windows ARM64
runtime-download and inference smoke.

## Testing

On an x64 Windows 11 machine (Visual Studio 2022 Build Tools with the
ARM64 tools and Clang components, Rust `aarch64-pc-windows-msvc`
target), from this branch:

- `scripts\build-windows.ps1 -TargetArch arm64` cross-compiles the host
in 3.5 minutes; `target\aarch64-pc-windows-msvc\debug\mesh-llm.exe` is
PE machine `0xAA64` (159.8 MB).
- `scripts\build-windows.ps1` without `-TargetArch` still builds the x64
host (`0x8664`, 176.2 MB).
- Both in one PowerShell session, ARM64 first: the ARM64 run leaves
`VSCMD_ARG_TGT_ARCH=arm64` and the ARM64 `cl` on `PATH`, the x64 run
then says it re-imports vcvars64, and the hosts are `0xAA64` and
`0x8664`.

Native Windows ARM64 validation runs in pinned CI. Local PowerShell
tests verified architecture selection for native builds and
cross-builds. The package selector identified the published ARM64
executable from its PE header.

One thing I hit on that machine, unrelated to this change: the
repository's `.cargo/config.toml` sets `rustc-wrapper = "sccache"`, so
`build-windows.ps1` fails with "program not found" where sccache isn't
installed. I removed that line locally for these builds.

---------

Co-authored-by: James Dumay <james@generalinference.xyz>
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.

3 participants