Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configure your local Rust development environment for Azure to build cloud applications efficiently on your workstation before deployment. Local development gives you access to a wider variety of tools and a familiar environment for faster iteration.
This article provides suggestions to set up and validate a local Rust development environment that integrates seamlessly with Azure services.
One-time subscription creation
You create Azure resources within a subscription and resource group. If you don't have a subscription, create a free trial subscription.
If you already have a subscription, access your existing subscription with:
One-time software installation
For Azure development with Rust on your local workstation, install the following tools:
| Name/Installer | Description |
|---|---|
| Rust | Install the Rust programming language via rustup, which includes the Rust compiler (rustc), package manager (cargo), and standard library. |
| Visual Studio Code | Visual Studio Code gives you a great Rust integration and coding experience but it isn't required. You can use any code editor. |
| Visual Studio Code extensions | Install any relevant extensions for Azure services you intend to use. |
| rust-analyzer extension | The recommended VS Code extension for Rust language support, providing code completion, error checking, and more. |
How to install Rust
Follow these steps to install Rust:
Follow the instructions for your operating system to install rustup, the Rust toolchain installer.
Verify your installation by running the following commands:
rustc --version cargo --version
The Rust toolchain includes:
For detailed installation guidance and troubleshooting, see the Installation chapter in The Rust Programming Language book. For development environment setup tips, including editor configuration, see the Development Environment chapter and the official Rust development tools guide.
Create an Azure resource group for your project
Open the Azure portal in a web browser.
In the search bar, enter resource groups and select it.
Select + Create.
Enter your resource group settings:
Property Value Subscription Select your subscription. Resource group Enter your resource group name. This resource group name is used as part of a resources URI when you access the Resource Manager (management plane). The name isn't used for control (such as creating a database) or data plane (inserting data into a table). Region Select a geographical region for the resource group. Select Review + create to begin validation.
When validation successes, select Create.
Add Azure SDK crates to your Rust project
You can get the Azure SDK for Rust crates from crates.io. To learn more, see Azure SDK for Rust.
Authenticate to Azure
To authenticate to Azure from your Rust application, use the Azure Identity SDK crate. This library provides a set of credential types that you can use to authenticate to Azure services.
Additional Rust resources
If you're new to Rust, these official resources can help you get up to speed:
- The Rust Programming Language - The official Rust book, covering everything from basics to advanced topics
- Rust by Example - Learn Rust through hands-on examples
- The Cargo Book - Complete guide to Cargo, Rust's package manager and build system
- Rustlings - Interactive exercises to learn Rust
- Rust development tools - Official overview of IDEs, editors, and development tools