Remove Cargo.toml when being installed via vcpkg#7112
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates multiple vcpkg portfile.cmake scripts to remove Rust Cargo.toml manifests from the extracted Azure SDK for C++ source tree during vcpkg builds, aiming to prevent downstream component governance scanners from flagging Rust dependencies that aren’t built/used in these vcpkg scenarios.
Changes:
- Add
file(GLOB_RECURSE ...)+file(REMOVE_RECURSE ...)steps intended to deleteCargo.tomlduring vcpkg packaging for several ports. - Apply the same removal pattern broadly across core, identity, keyvault, storage, tables, eventhubs, attestation, appconfiguration, and template ports.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/template/azure-template/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/tables/azure-data-tables/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/storage/azure-storage-queues/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/storage/azure-storage-files-shares/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/storage/azure-storage-files-datalake/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/storage/azure-storage-common/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/storage/azure-storage-blobs/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/keyvault/azure-security-keyvault-secrets/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/keyvault/azure-security-keyvault-keys/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/keyvault/azure-security-keyvault-certificates/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/keyvault/azure-security-keyvault-administration/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/identity/azure-identity/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/eventhubs/azure-messaging-eventhubs/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/core/azure-core/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/core/azure-core-tracing-opentelemetry/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/core/azure-core-amqp/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build (notably relevant due to embedded Rust). |
| sdk/attestation/azure-security-attestation/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
| sdk/appconfiguration/azure-data-appconfiguration/vcpkg/portfile.cmake | Attempts to remove Cargo.toml from extracted sources before configuring the build. |
Jinming-Hu
approved these changes
May 11, 2026
RickWinter
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
Cargo.tomlfiles from the source tree when being installed via vcpkg.This will remove false component governance alerts for our clients, so they won't scan for outdated dependencies in Rust code.
We never build Rust when being installed via vcpkg -
azure-core-amqp-cppships with-DDISABLE_RUST_IN_BUILD=ON.