Azure / Azure/azure-sdk-for-rust

Validate Windows ARM64 native driver builds

Open
#4,989 0 comments 1 reaction 0 assignees View on GitHub
Client Cosmos Native Wrapper
Dominant language
Rust
Stars
884
Forks
365
Avg merge
2d 19h
Merged PRs (30d)
109

Description

### Feature Summary

Validate and enable the Windows ARM64 build and Go/cgo consumption path for `azure_data_cosmos_driver_native` in the Big-5+musl native-driver matrix.

### Feature Description

Part of the Cosmos DB Go SDK v2 (`azcosmos/v2`) native-driver engineering system tracked by #4967.

The current matrix represents Windows ARM64 as `aarch64-pc-windows-gnu`, but Rust does not provide that as a supported production target. The supported Rust target is `aarch64-pc-windows-msvc`; a possible LLVM-MinGW route may instead require the experimental `aarch64-pc-windows-gnullvm` target. Neither Rust-to-Go/cgo link path has been validated for this repository, so the matrix row currently fails closed.

Scope:

- Select and document the production Windows ARM64 toolchain:
- preferred evaluation: Rust `aarch64-pc-windows-msvc` with Visual Studio ARM64 build tools;
- alternative evaluation: LLVM-MinGW with a compatible Rust target, only if it can meet production support requirements.
- Build the `rust_driver_native_interface` static and dynamic artifacts for Windows ARM64.
- Capture `rustc --print native-static-libs` programmatically and emit `rust-driver-native-interface-metadata.json`.
- Generate the `windows/arm64` Go module for `Azure/azure-cosmos-driver`.
- Configure an ARM64-capable C compiler/linker for `CGO_ENABLED=1 GOOS=windows GOARCH=arm64`.
- Prove that a scratch Go application links against the pipeline-produced native artifact and runs on Windows ARM64.
- Add the validated build environment and toolchain to the 1ES matrix.
- Replace the invalid matrix triple and enable `windows-arm64` only after the link-and-run proof passes.
- Document any MSVC/GNU ABI, archive-format, C-runtime, or Windows system-library constraints discovered.

Definition of done:

- The selected Rust target and C/cgo toolchain are documented and use production-supported components.
- CI reproducibly builds the Windows ARM64 native artifacts and metadata from a pinned source commit.
- A generated `windows/arm64` Go module builds from pipeline output without a local Rust build or manually copied library.
- The resulting scratch Go executable runs successfully on a Windows ARM64 environment.
- The `windows-arm64` matrix row is enabled with tests that fail closed when its required toolchain is unavailable.

### Use Case

Windows ARM64 is part of the decided initial Big-5+musl target matrix. Go v2 customers on Windows ARM64 need a prebuilt native module that preserves the normal `go get` and `go build` experience without installing Rust.

### Alternatives

Exclude Windows ARM64 from the initial release, or publish a customer-managed dynamic-library path. Both conflict with the currently decided initial target matrix and should be fallback outcomes only if no production-supported Rust/cgo toolchain combination can be validated.

### Additional Context

Related issues: #4967 (cross-build matrix and CI), #4968 (platform signing), and #4969 (SBOM, provenance, and checksums). The Windows ARM64 row is currently disabled in the local production pipeline skeleton so unsupported or unverified artifacts cannot be published.

Contributor guide

Open the contributing guide

Research direction

Start with the disabled windows-arm64 row in the local production pipeline skeleton and the rust_driver_native_interface build path, then evaluate the supported Rust and C/cgo toolchains described in the issue. Done means reproducible Windows ARM64 artifacts and metadata, a generated windows/arm64 Go module, a scratch application that links and runs, and a validated matrix row with fail-closed tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, rust
Domain
build-system, ci-cd, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.