Repository navigation
[EngSys] Add opt-in Rust native wheel build support - #49397
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ac28761-49fd-4c09-9885-101a72746ec0
|
Azure Pipelines: Successfully started running 1 pipeline(s). 10 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🔵 Needs a closer look
The cross-platform toolchain, credential, container, and ARM64 integration paths have not yet been exercised in Azure DevOps.
0 open findings
What changed in this PR
Adds opt-in Rust native-wheel support to shared build tooling without enabling any SDK package.
Changes:
- Routes
[tool.cibuildwheel]projects through cibuildwheel. - Adds Microsoft Rust toolchain setup, authentication, environment forwarding, and extended timeouts.
- Adds pipeline/build tests and native-build documentation.
| File | Description |
|---|---|
eng/tools/azure-sdk-tools/tests/test_parse_functionality.py |
Tests cibuildwheel configuration detection. |
eng/tools/azure-sdk-tools/tests/test_native_build_pipeline.py |
Tests Rust pipeline configuration and scripts. |
eng/tools/azure-sdk-tools/tests/test_build_interactions.py |
Tests native build routing and failures. |
eng/tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py |
Detects cibuildwheel opt-in. |
eng/tools/azure-sdk-tools/ci_tools/build.py |
Routes opted-in packages through cibuildwheel. |
eng/pipelines/templates/steps/resolve-build-platforms.yml |
Selects build logging level. |
eng/pipelines/templates/steps/install-msrust-toolchain.yml |
Installs and authenticates Rust tooling. |
eng/pipelines/templates/steps/build-package-artifacts.yml |
Integrates Rust setup into wheel builds. |
eng/pipelines/templates/stages/archetype-sdk-client.yml |
Exposes Rust build parameters. |
eng/pipelines/templates/jobs/ci.yml |
Forwards parameters and extends timeouts. |
doc/dev/packaging.md |
Documents native-wheel configuration. |
🧠 Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ac28761-49fd-4c09-9885-101a72746ec0
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7ac28761-49fd-4c09-9885-101a72746ec0
Libba Lawrence (l0lawrence)
left a comment
There was a problem hiding this comment.
Can we test these changes on a service to ensure it won't run into pipeline issues - maybe a template-three if needed
Revert aaf2e33 and its formatting follow-up e6fb68a. Remove the Rust fixture, generic PR exclusions, and fixture-driven version synchronization while preserving the original opt-in Rust build support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8323733d-4446-4291-afcc-33c49f5afa86
|
deciding not to add an
|
|
verifying that normal build path is unaffected by these changes: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6947514&view=results |


Summary
Port the reusable native wheel-build support from python-rust-integration #46851 and the prototype in Rust Driver EngSys Prototype #48867 onto current
mainRoute packages with a
[tool.cibuildwheel]table through cibuildwheel, including non-setuptools backends such as Maturin.Add opt-in Microsoft Rust toolchain setup, feed authentication, and parameter forwarding through the shared build templates.
Forward Rust/Cargo settings into Linux wheel-build containers, expose Windows ARM64 Python import libraries, and allow longer timeout on native builds.
Add generic build-routing tests, PowerShell-based pipeline tests, and native-build documentation.
Minor differences made by this PR
build-package-artifacts.yml<- No default Rust Toolchain feed URL is set, Cosmos should explicitly pass it in in their pipeline (reason: unsure if the current 'test-org' feed is intended to be long term, can add default back later)install-msrust-toolchain.ymlhard-codes the Crates Io Registry name rather than allowing it to be passed in, since there doesn't appear to currently be a reason for this to changeScope and follow-ups
This PR does not change any package under
sdk/or activate Cosmos.Remaining TODO:
TODO FOR COSMOS after this merges:
Cosmos should keep their
cosmos-sdk-client.ymlchange on their prototype branch to opt into installing MsRust and signing binaries• Keep the Cosmos native package changes, including its build backend, rust-toolchain.toml , bash scripts for installing msrustup and configuring cargo feed in the linux container, and the cibuildwheel configuration/hooks.
forward the parameters to archetype-sdk-client:
e.g.
Validation
Result: 47 passed, 1 skipped. The skip is an existing namespace-discovery test whose expected package path is absent.
Black checks passed for all five changed/new Python files, and
git diff --checkpassed.No Azure DevOps pipeline or actual native wheel build was run.