Add mage buildRust - #5124
Open
nikola-jokic wants to merge 2 commits into
Open
Conversation
Contributor
Greptile SummaryThe PR adds a reusable Mage target that bootstraps protobuf dependencies, regenerates Rust protobuf sources, and builds the Rust client.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| 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 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", | ||
| ) |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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