Skip to content

Add mage buildRust - #5124

Open
nikola-jokic wants to merge 2 commits into
masterfrom
nikola-jokic/mage-proto
Open

Add mage buildRust#5124
nikola-jokic wants to merge 2 commits into
masterfrom
nikola-jokic/mage-proto

Conversation

@nikola-jokic

Copy link
Copy Markdown
Contributor

What type of PR is this?

Fix

What this PR does / why we need it

Add buildRust mage target, which is consistent with other clients

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a reusable Mage target that bootstraps protobuf dependencies, regenerates Rust protobuf sources, and builds the Rust client.

  • Routes Rust client CI builds through BuildRust.
  • Adds magefiles/rust.go to both push and pull-request workflow path filters.
  • Keeps generated-code freshness verification after generation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/rust-client.yml The workflow now watches the Rust Mage target and invokes it on every toolchain matrix entry, resolving the previously reported CI coverage gap.
magefiles/rust.go Adds the Rust build target with protobuf bootstrapping, Cargo availability validation, and generated-code production enabled.

Reviews (2): Last reviewed commit: "wip" | Re-trigger Greptile

Comment thread magefiles/rust.go
Comment on lines +11 to +20
// BuildRust builds the armada Rust client, regenerating its pre-generated proto files in client/rust/src/gen.
func BuildRust() error {
mg.Deps(BootstrapProto)
if _, err := exec.LookPath("cargo"); err != nil {
return errors.Errorf("cargo not found; install the Rust toolchain to build the Rust client")
}
return sh.RunWith(
map[string]string{"ARMADA_GENERATE": "1"},
"cargo", "build", "--manifest-path", "client/rust/Cargo.toml",
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Rust target lacks CI coverage

The Rust workflow neither watches magefiles/rust.go nor invokes BuildRust, so regressions in this new Mage orchestration can merge unnoticed while the workflow's separate bootstrap and Cargo commands continue to pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant