Skip to content

Implement Rust packaging support in azsdk pkg pack#15193

Open
raych1 wants to merge 1 commit intomainfrom
users/raych1/impl-rust-pack-tool
Open

Implement Rust packaging support in azsdk pkg pack#15193
raych1 wants to merge 1 commit intomainfrom
users/raych1/impl-rust-pack-tool

Conversation

@raych1
Copy link
Copy Markdown
Member

@raych1 raych1 commented Apr 17, 2026

Resolved #14927

What

Add Rust crate packaging to azsdk pkg pack by shelling out to eng/scripts/Pack-Crates.ps1 in the azure-sdk-for-rust repo.

Changes

  • RustLanguageService.cs: Add PackAsync override that invokes Pack-Crates.ps1 with -PackageNames, -NoVerify, and optional -OutputPath.
  • Extended test coverage.

@github-actions github-actions bot added the azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli label Apr 17, 2026
@raych1 raych1 force-pushed the users/raych1/impl-rust-pack-tool branch from dd2c232 to fbcfeb7 Compare April 17, 2026 21:04
@raych1 raych1 marked this pull request as ready for review April 17, 2026 21:09
@raych1 raych1 requested a review from a team as a code owner April 17, 2026 21:09
@raych1 raych1 requested review from Copilot and heaths April 17, 2026 21:09
@raych1 raych1 self-assigned this Apr 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Rust crate packaging support to azsdk-cli’s azsdk pkg pack workflow by implementing PackAsync in RustLanguageService, invoking the Rust repo’s PowerShell pack script and returning an artifact path when available.

Changes:

  • Implement RustLanguageService.PackAsync to run eng/scripts/Pack-Crates.ps1 with -PackageNames, -NoVerify, and optional -OutputPath.
  • Add/extend pack-related tests in PackToolTests and RustLanguageServiceTests.
  • Update Rust build script path constant casing in RustLanguageService.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tools/azsdk-cli/Azure.Sdk.Tools.Cli/Services/Languages/RustLanguageService.cs Adds Rust PackAsync implementation + artifact resolution helper; also changes build script relative path casing.
tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Tools/Package/PackToolTests.cs Adds Rust pack integration-style tests for PackTool (script invocation + arg verification).
tools/azsdk-cli/Azure.Sdk.Tools.Cli.Tests/Services/Languages/RustLanguageServiceTests.cs Adds unit tests for Rust PackAsync behavior and helpers for setting up the pack script.

@raych1 raych1 force-pushed the users/raych1/impl-rust-pack-tool branch 2 times, most recently from 501012a to 7296933 Compare April 17, 2026 21:42
Add PackAsync override to RustLanguageService that shells out to
eng/scripts/Pack-Crates.ps1 in the azure-sdk-for-rust repo. The
implementation passes -PackageNames and -NoVerify flags, and optionally
-OutputPath when specified. Artifact path resolution handles both
default (target/package/) and custom output locations with fallback
search for .crate files.

Add comprehensive tests in both PackToolTests (integration-level) and
RustLanguageServiceTests (unit-level) covering success, failure, missing
script, output path forwarding, and argument verification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@raych1 raych1 force-pushed the users/raych1/impl-rust-pack-tool branch from 7296933 to ade5cf8 Compare April 17, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azsdk-cli Issues related to Azure/azure-sdk-tools::tools/azsdk-cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Rust Onboarding] Add Rust support to azsdk pkg pack

2 participants