microsoft / microsoft/mssql-rs

Investigate cross-compiling the Windows ARM64 mock wheel from the x64 agent

Open
#393 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
53
Forks
14
Avg merge
1d 15h
Merged PRs (30d)
137

Description

Follow-up to #392, which merged the Linux libc-flavour pairs and took the sandbox publish pipeline's concurrent build agents from 7 to 5.

Idea

BuildWindows_arm64 could potentially be folded into BuildWindows_x64 by cross-compiling with maturin build --target aarch64-pc-windows-msvc. That would take peak concurrent build agents from 5 to 4 and free one more RUST-ARM64-WUS3 agent.

It would also delete the two Node.js bootstrap steps that only the ARM64 Windows agent needs:

- pwsh: ./scripts/setup-nodejs-path.ps1
  displayName: 'Add Node.js to PATH for ADO tasks'
- pwsh: ./scripts/install-nodejs-to-agent.ps1
  displayName: 'Install Node.js to agent externals folder'

Why it looks plausible

  • mssql-mock-tds pulls the openssl crate only on cfg(not(windows)), and native-tls uses SChannel on Windows. So there is no C library to cross-build — the usual blocker for this kind of change is absent.
  • pyo3 is configured abi3-py39. abi3 cross-compilation does not need a target-architecture interpreter, only PYO3_CROSS_PYTHON_VERSION.

Why it was not done in #392

Two things cannot be settled by reading the repo:

  1. Does the RUST-W22-SQL25 image have the MSVC ARM64 cross tools (VC.Tools.ARM64)? Without them the link step fails, and that only surfaces in a real pipeline run.
  2. Does the cross-built wheel actually load on Windows ARM64? Building natively today gives us an accidental smoke test that cross-compiling removes. Losing it silently would be worse than the agent saving is worth.

Both are answerable, but they need runs of a pipeline that has publish side effects. Bundling that speculation into #392 would have put a clean two-agent win at risk of a red run.

Suggested approach

  1. Confirm VC.Tools.ARM64 is present on the RUST-W22-SQL25 image (or get it added).
  2. Prototype the cross-build on a branch and confirm the wheel's platform tag is win_arm64.
  3. Verify the resulting wheel imports and runs on a real Windows ARM64 machine before deleting the native job.
  4. Only then merge the jobs.

If step 1 or 3 does not pan out, close this — keeping the native ARM64 job is a perfectly reasonable outcome.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking whether the RUST-W22-SQL25 image has VC.Tools.ARM64, then prototype BuildWindows_arm64 cross-compilation from BuildWindows_x64 with maturin and aarch64-pc-windows-msvc. Confirm the wheel is tagged win_arm64 and imports and runs on a real Windows ARM64 machine before removing the native job and its Node.js setup steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, node.js, python, rust
Domain
build-system, ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.