Logo

dev-resources.site

for different kinds of informations.

Pulumi WASM/Rust devlog #3

Published at
1/13/2025
Categories
devops
rust
opensource
pulumi
Author
andrzejressel
Categories
4 categories in total
devops
open
rust
open
opensource
open
pulumi
open
Author
13 person written this
andrzejressel
open
Pulumi WASM/Rust devlog #3

Welcome to the third devlog for the WASM/Rust support for Pulumi! This week, I focused on improving the versioning and release process, along with adding a new format!-like macro. Here's what's new:

Versioning

Previously, every version used the format 0.0.0-NIGHTLY-COMMITSHA. The main issue was that users did not know when a library version was released, making it difficult to check for updates.

To solve this, I've switched to calver. For example, today's release would be v25.1.12-47a9821.

This ensures users can quickly identify the release date of a version, making it easier to stay up to date.

Release Spam

Pulumi and binstall require a GitHub release for every deployed version. Currently, I deploy a new version after every commit to the main branch, which creates notification spam for users who star the repository.

To resolve this, I've created a separate repository just for releases: pulumi-wasm-releases. This keeps the main repository cleaner while ensuring users can still access the latest versions.

Additionally, the commands for downloading binaries have changed due to the separate release repository. Be sure to check the example repository for updated instructions.

Format Macro

The latest version of the library introduces the pulumi_format! macro. It works like Rust's format! macro but is designed specifically for Pulumi's Output types.

A key feature is that not all arguments need to be of type Outputβ€”you can seamlessly combine Output values with regular values.

For example:

let a = Output::new(&1);
let b = Output::new(&"test".to_string());
let formatted: Output<String> = pulumi_format!("{} {}", a, b); // "1 test"
Enter fullscreen mode Exit fullscreen mode

Replacement of combineX function with pulumi_combine! macro

Previously, there were multiple combineX methods for combining Outputs. These have now been replaced with a single pulumi_combine! macro for greater flexibility and simplicity. This change reduces redundancy and makes the API more intuitive.

For example:

let a = Output::new(&1);
let b = Output::new(&"test");
let combined: Output<(i32, &str)> = pulumi_combine!(a, b);
Enter fullscreen mode Exit fullscreen mode

That's all for this week's updates!. As always, feedback is welcomeβ€”let me know your thoughts or if you run into any issues!

pulumi Article's
30 articles in total
Favicon
Pulumi WASM/Rust devlog #3
Favicon
Pulumi WASM/Rust devlog #2
Favicon
Pulumi WASM/Rust devlog #1
Favicon
Infrastructure as Code: Comparing Pulumi and HCL Approaches
Favicon
Unlocking the Power of Azure Functions Flex Consumption Plan with Pulumi
Favicon
Pulumi with Terraform – the easy way
Favicon
Experimental WASM/Rust support for Pulumi
Favicon
Pulumi in Python: Translating Interpolation
Favicon
What Is Pulumi And How To Use It
Favicon
Pulumi-Day1- Getting Started
Favicon
Pulumi: Empowering Infrastructure Engineers with Real Programming Languages
Favicon
Pulumi vs Terraform: An In-Depth Comparison
Favicon
Pulumi Has Wowed Me
Favicon
Pulumi vs Terraform
Favicon
Pulumi in Action: Beyond Terraform to Build HA Web Apps on AKS
Favicon
Using MongoDB Atlas with Azure Kubernetes Service - Coded with Pulumi
Favicon
Allowing GCP Compute Resources to Assume AWS IAM Roles with Pulumi
Favicon
Should you use Terraform or Pulumi?
Favicon
Deploying to Azure from Azure DevOps without secrets
Favicon
Accelerating Releases with Pulumi: My Proxy Project Journey
Favicon
Learning Go by examples: part 12 - Deploy Go apps in Go with Pulumi
Favicon
Infrastructure as Code: A Beginner's Guide
Favicon
Deploying a Database Cluster on DigitalOcean using Pulumi
Favicon
Structuring your Infrastructure as Code
Favicon
Image Label Detection using AWS and Pulumi
Favicon
What is the best `as Code` tool in 2023?
Favicon
Create an Azure-Ready GitHub Repository using Pulumi
Favicon
How I get better feedback on my PRs (and how you can, too)
Favicon
Terraform vs. Pulumi : A Look at Both Tools
Favicon
Introducing Azure Native 2.0

Featured ones: