Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 2.29 KB

File metadata and controls

52 lines (32 loc) · 2.29 KB
title Publish Cargo packages from the command line
description Learn how to connect to your feed and publish your Cargo packages from the command line.
ms.service azure-devops-artifacts
ms.topic how-to
ms.date 03/25/2025
monikerRange >= azure-devops-2022

Publish Cargo packages from the command line

[!INCLUDE version-lt-eq-azure-devops]

This article walks you through setting up your project, authenticating with your Azure Artifacts feed, and publishing Cargo packages from the command line.

Prerequisites

Product Requirements
Azure DevOps - An Azure DevOps organization.
- An Azure DevOps project.
- Download and install rustup. You'll need Cargo version 1.74.0 or later.

Create a feed

Azure Artifacts recommends using a dedicated feed for consuming crates from crates.io and a separate feed for publishing your internal crates. If you already have an Azure Artifacts feed, skip to the next section. Otherwise, create a new feed as follows:

  1. Sign in to your Azure DevOps organization, and then navigate to your project.

  2. Select Artifacts, and then select Create Feed.

  3. Enter a Name for your feed and specify its Visibility. If you want to include packages from public registries, check Upstream sources, then select a Scope for your feed.

  4. Select Create when you're done.

    :::image type="content" source="media/cargo-create-a-feed.png" alt-text="A screenshot displaying how to create a new feed in Azure Artifacts.":::

Publish packages

  1. If you haven't authenticated with your feed yet, follow the steps in the Project setup to configure your config files, set up a credential provider, and log in to the registry.

  2. Run the following command in your project directory to publish your Cargo package:

    cargo publish
    

Related content