Skip to content

Commit 6b1adb8

Browse files
Merge pull request #2679 from madeline-underwood/rust_gcp2
Rust gcp2_JA to sign off
2 parents c9ca37a + f34f19e commit 6b1adb8

6 files changed

Lines changed: 46 additions & 66 deletions

File tree

content/learning-paths/servers-and-cloud-computing/rust-on-gcp/_index.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
---
22
title: Deploy Rust on Google Cloud C4A (Arm-based Axion VMs)
33

4-
draft: true
5-
cascade:
6-
draft: true
4+
description: Learn to deploy and benchmark Rust applications on Google Cloud C4A virtual machines powered by Arm-based Axion processors.
75

86
minutes_to_complete: 30
97

10-
who_is_this_for: This learning path is intended for software developers deploying and optimizing Rust workloads on Linux/Arm64 environments, specifically using Google Cloud C4A virtual machines powered by Axion processors.
8+
who_is_this_for: This is an introductory topic for developers deploying and optimizing Rust workloads on Linux/Arm64 environments, specifically using Google Cloud C4A virtual machines powered by Axion processors.
119

1210
learning_objectives:
1311
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
---
2-
title: Getting started with Rust on Google Axion C4A (Arm Neoverse-V2)
2+
title: Get started with Rust on Google Axion C4A (Arm Neoverse-V2)
33

44
weight: 2
55

66
layout: "learningpathall"
77
---
88

9-
## Google Axion C4A Arm instances in Google Cloud
9+
## Explore Google Axion C4A Arm instances in Google Cloud
1010

1111
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
1212

1313
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
1414

15-
To learn more about Google Axion, refer to the [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) blog.
15+
To learn more about Google Axion, see the Google blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
1616

17-
## Rust
17+
## Explore Rust
1818

1919
[Rust](https://www.rust-lang.org/) is a modern, high-performance systems programming language designed for safety, speed, and concurrency. It provides memory safety without garbage collection, making it ideal for building reliable and efficient software.
2020

21-
Developed by Mozilla, Rust is widely used in system-level programming, web assembly, embedded systems, and performance-critical applications.
22-
Its strong type system and ownership model help prevent common bugs like data races and memory leaks.
21+
Developed by Mozilla, Rust is widely used in system-level programming, web assembly, embedded systems, and performance-critical applications. Its strong type system and ownership model help prevent common bugs like data races and memory leaks.
2322

24-
To learn more, visit the [official Rust website](https://www.rust-lang.org/).
23+
To learn more, visit the [Rust website](https://www.rust-lang.org/).

content/learning-paths/servers-and-cloud-computing/rust-on-gcp/baseline.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Test Rust baseline performance on Google Axion C4A Arm virtual machines
2+
title: Perform baseline testing
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
## Perform baseline testing
9+
## Overview
1010

11-
You can perform baseline testing of Rust on GCP SUSE aarch64 VMs to verify installation, build functionality, and compilation performance on the Arm-based Axion C4A platform.
11+
Now that Rust is installed, verify the installation, build functionality, and compilation performance on your Arm-based Axion C4A instance.
1212

13-
### Create a sample Rust program
13+
## Create a sample Rust program
1414

1515
Create and build a simple "Hello, World" application to verify that Rust is working correctly:
1616

@@ -33,9 +33,9 @@ The output is similar to:
3333
Hello, world!
3434
```
3535

36-
This confirms that Rust and Cargo are properly configured on your aarch64 VM.
36+
This confirms that Rust and Cargo are properly configured on your Arm64 VM.
3737

38-
### Measure compilation performance
38+
## Measure compilation performance
3939

4040
Use the `time` command to measure compilation performance on the Arm64 processor:
4141

@@ -59,3 +59,7 @@ sys 0m0.071s
5959
```
6060

6161
The timing results show that Rust compilation performs well on the Arm64 architecture, with the "real" time indicating the total elapsed time for the build process.
62+
63+
## What you've accomplished and what's next
64+
65+
You've successfully verified your Rust installation and measured baseline compilation performance on the C4A instance. In the next section, you'll benchmark Rust code execution using Criterion to measure runtime performance and consistency.

content/learning-paths/servers-and-cloud-computing/rust-on-gcp/benchmarking.md

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ weight: 6
66
layout: learningpathall
77
---
88

9-
## Benchmark Rust performance
9+
## Overview
1010

11-
This section demonstrates how to benchmark Rust performance using `cargo bench` and the Criterion library to measure code execution speed and performance consistency on aarch64 hardware.
11+
This section demonstrates how to benchmark Rust performance using `cargo bench` and the Criterion library to measure code execution speed and performance consistency on Arm64 hardware.
1212

13-
### Create a benchmark project
13+
## Create a benchmark project
1414

1515
Create a new Rust project specifically for benchmarking:
1616

@@ -19,9 +19,9 @@ cargo new rust-benchmark
1919
cd rust-benchmark
2020
```
2121

22-
### Configure Criterion as a dependency
22+
## Configure Criterion as a dependency
2323

24-
Criterion is the recommended benchmarking crate for Rust. Edit the `Cargo.toml` file in your project root directory and replace the existing content with:
24+
Criterion is the recommended benchmarking crate for Rust. Open the `Cargo.toml` file in your project root directory and replace the existing content with:
2525

2626
```toml
2727
[dependencies]
@@ -34,21 +34,15 @@ harness = false
3434

3535
This configuration enables Criterion for high-precision benchmarking and disables the default test harness.
3636

37-
### Create the benchmark directory and file
37+
## Create the benchmark directory and file
3838

3939
Create the benchmark structure that Cargo expects:
4040

4141
```console
4242
mkdir benches
4343
```
4444

45-
Create a new benchmark file in the `benches/` directory:
46-
47-
```console
48-
edit benches/my_benchmark.rs
49-
```
50-
51-
Add the following benchmark code to measure Fibonacci number calculation performance:
45+
Create a new file named `my_benchmark.rs` in the `benches/` directory and add the following benchmark code to measure Fibonacci number calculation performance:
5246

5347
```rust
5448
use criterion::{black_box, Criterion, criterion_group, criterion_main};
@@ -72,7 +66,7 @@ criterion_main!(benches);
7266

7367
This code implements a recursive Fibonacci function and measures how efficiently Rust computes the 20th Fibonacci number. The `black_box` function prevents the compiler from optimizing away the benchmark.
7468

75-
### Run the benchmark
69+
## Run the benchmark
7670

7771
Execute the benchmark using Cargo:
7872

@@ -92,29 +86,13 @@ Found 1 outliers among 100 measurements (1.00%)
9286
1 (1.00%) low mild
9387
```
9488

95-
### Benchmark Metrics Explanation
96-
97-
- **Average Time:** Mean execution time across benchmark runs.
98-
- **Outliers:** Represent runs significantly slower or faster than average.
99-
- **Plotting Backend:** Used `plotters` since Gnuplot was not found.
100-
- The results show **consistent performance** with only slight variation across 100 measurements.
101-
102-
### Understand the results
103-
104-
The benchmark output provides several key metrics:
105-
106-
- **Average time**: Mean execution time across benchmark runs
107-
- **Outliers**: Runs significantly slower or faster than average
108-
- **Plotting backend**: Uses plotters since Gnuplot wasn't found
109-
110-
The results show consistent performance with only slight variation across 100 measurements.
111-
112-
### Performance summary
89+
## Performance summary
90+
The benchmark output provides several key metrics: the average time represents the mean execution time across benchmark runs, outliers identify runs that were significantly slower or faster than average, and the plotting backend indicates that plotters is being used since Gnuplot wasn't found on the system.
11391

114-
The following table shows results from running the benchmark on a `c4a-standard-4` (4 vCPU, 16 GB memory) aarch64 VM in GCP using SUSE:
92+
The following table shows results from running the benchmark on a `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP using SUSE:
11593

11694
| Benchmark | Average Time (µs) | Min (µs) | Max (µs) | Outliers (%) | Remarks |
11795
|---------------|------------------:|---------:|---------:|-------------:|---------|
11896
| fibonacci 20 | 12.028 | 12.026 | 12.030 | 1.00% | Stable performance with minimal variation |
11997

120-
The Fibonacci benchmark demonstrates consistent performance on the aarch64 platform. The average execution time of 12.028 µs indicates efficient CPU computation, while only 1% of measurements were outliers. This low variance confirms Rust's reliable execution speed and performance stability on aarch64 architecture.
98+
The Fibonacci benchmark demonstrates consistent performance on the Arm64 platform. The average execution time of 12.028 µs indicates efficient CPU computation, while only 1% of measurements were outliers. This low variance confirms Rust's reliable execution speed and performance stability on Arm64 architecture.

content/learning-paths/servers-and-cloud-computing/rust-on-gcp/installation.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
---
23
title: Install Rust
34
weight: 4
@@ -6,11 +7,11 @@ weight: 4
67
layout: learningpathall
78
---
89

9-
## Install Rust
10+
## Overview
1011

11-
This section explains how to install and configure Rust on a GCP SUSE aarch64 VM, preparing your environment for building and benchmarking Rust applications.
12+
This section explains how to install and configure Rust on your GCP SUSE Arm64 VM, preparing your environment for building and benchmarking Rust applications.
1213

13-
### Update your system
14+
## Update your system
1415

1516
Update the system and install essential build tools required for compiling Rust programs:
1617

@@ -22,7 +23,7 @@ sudo zypper install -y curl gcc make
2223

2324
This ensures your system has the latest packages and the necessary compilation tools.
2425

25-
### Install Rust using rustup
26+
## Install Rust using rustup
2627

2728
Rust provides an official installer script via `rustup` that handles the setup automatically:
2829

@@ -32,7 +33,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
3233

3334
When prompted, select option 1 for the default installation. This installs the latest stable version of Rust along with Cargo, Rust's package manager and build system.
3435

35-
### Configure your environment
36+
## Configure your environment
3637

3738
Activate Rust's environment variables for your current shell session:
3839

@@ -42,7 +43,7 @@ source $HOME/.cargo/env
4243

4344
This command adds the Rust toolchain to your PATH, making the `rustc` compiler and `cargo` commands available.
4445

45-
### Verify the installation
46+
## Verify the installation
4647

4748
Confirm that Rust and Cargo installed successfully by checking their versions:
4849

@@ -58,4 +59,4 @@ rustc 1.91.0 (f8297e351 2025-10-28)
5859
cargo 1.91.0 (ea2d97820 2025-10-10)
5960
```
6061

61-
Your Rust installation is now complete and ready for development on the aarch64 platform.
62+
Your Rust installation is now complete and ready for development on your Arm64 instance.

content/learning-paths/servers-and-cloud-computing/rust-on-gcp/instance.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ To create a virtual machine based on the C4A instance type:
2424
- Set **Series** to `C4A`.
2525
- Select `c4a-standard-4` for machine type.
2626

27-
![Create a Google Axion C4A Arm virtual machine in the Google Cloud Console with c4a-standard-4 selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console")
27+
![Screenshot of Google Cloud Console showing the machine configuration section with C4A series and c4a-standard-4 machine type selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console")
2828

2929

30-
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**.
31-
- If using use **SUSE Linux Enterprise Server**. Select "Pay As You Go" for the license type.
32-
- Once appropriately selected, please Click **Select**.
30+
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**.
31+
- If using **SUSE Linux Enterprise Server**, select "Pay As You Go" for the license type.
32+
- Once appropriately selected, click **Select**.
3333
- Under **Networking**, enable **Allow HTTP traffic**.
3434
- Click **Create** to launch the instance.
35-
- Once created, you should see a "SSH" option to the right in your list of VM instances. Click on this to launch a SSH shell into your VM instance:
35+
- Once created, you should see a "SSH" option to the right in your list of VM instances. Click on this to launch a SSH shell into your VM instance:
3636

37-
![Invoke a SSH session via your browser alt-text#center](images/gcp-ssh.png "Invoke a SSH session into your running VM instance")
37+
![Screenshot of VM instances list showing the SSH button in the Connect columnalt-text#center](images/gcp-ssh.png "Invoke a SSH session into your running VM instance")
3838

3939
- A window from your browser should come up and you should now see a shell into your VM instance:
4040

41-
![Terminal Shell in your VM instance alt-text#center](images/gcp-shell.png "Terminal shell in your VM instance")
41+
![Screenshot of terminal window showing a command-line shell interface connected to the VM instance#center](images/gcp-shell.png "Terminal shell in your VM instance")
4242

43-
Next, let's install rust!
43+
You're now ready to install Rust on your C4A instance.

0 commit comments

Comments
 (0)