rust plugin does not cross-compile
Metadata
Current evaluation
Rust plugin builds for host arch instead of target arch when cross-compiling. Triaged by maintainer with a fix plan (map arch to rust triple, rustup target add, set CARGO_BUILD_TARGET); a working PR branch was shared Aug 2025, but no fix has landed in craft-parts yet.
Suggested action: keep open
Reason: The issue is labelled Status: Triaged and the maintainer (lengau) actively worked it: on 2025-02-13 they outlined the fix (map target arch to rust triple, run `rustup target add`, set `CARGO_BUILD_TARGET`/`--target`), noted remaining linking issues, and on 2025-08-15 pointed to a working PR branch (lengau/uv-snap#9). The current rust_plugin.py still has no CARGO_BUILD_TARGET or target-triple handling, so the bug is unfixed and the issue remains actionable.
Issue body
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.8-27b |
Impact:
65
Quick Win:
26.0
Staleness:
45
Complexity:
60
Confidence:
70
Support Request:
5
|
keep open | Rust plugin builds for host arch instead of target arch when cross-compiling. Triaged by maintainer with a fix plan (map arch to rust triple, rustup target add, set CARGO_BUILD_TARGET); a working PR branch was shared Aug 2025, but no fix has landed in craft-parts yet. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
75
Complexity:
60
Confidence:
85
Support Request:
5
|
keep open | The rust plugin incorrectly builds for the host architecture instead of cross-compiling to the target. Triaged by a maintainer who outlined a fix and linked a working PR, but has seen no activity for over 11 months. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
68
Complexity:
45
Confidence:
85
Support Request:
0
|
keep open | Rust plugin fails to cross-compile, building for host architecture instead. Triaged bug with maintainer-proposed fix and a working PR branch, but inactive for over 10 months. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
78
Complexity:
55
Confidence:
80
Support Request:
5
|
keep open | rust plugin ignores cross-compilation targets, building host binaries. Triaged bug. Author proposed mapping architectures to rust triplets and setting CARGO_BUILD_TARGET, but hit linker errors. A functional PR branch exists. Awaiting review. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/snapcraft#1350
(confidence 55%)
Merged snapcraft PR adding cross-compilation support to the Rust plugin; likely the upstream counterpart, but this issue targets craft-parts and no craft-parts fix commit was found.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1350 rust plugin: Add support for cross-compilation | snapcraft | merged | Cross-compilation support added to the Rust plugin for snapcraft's --target-arch flag. Approved and merged despite unresolved comments and lack of ARM hardware testing. | |
| #2158 rust plugin: fix cargo builds and run tests | snapcraft | closed | Changes to fix cargo builds and add tests to the Rust plugin were closed and superseded by PR #2170 after the author discovered cargo test conflicts with cross-compilation, requiring a rework. | |
| #2264 Fix issue where Rust cross compile target is ignored | snapcraft | merged | Merged fix for Rust cross-compilation target being ignored. The plugin now only generates a .cargo/config file if one is missing, preserving existing project configs while fixing cross-compile paths. |