← Back to issue list

rust plugin: Add support for cross-compilation

View original Github issue

Metadata

Project
snapcraft
Number
#1350
Type
pull request
State
merged
Author
kalikiana
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

Support doing `snapcraft snap --target-arch=` with parts using the **Rust** plugin

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged after maintainer review, adding cross-compilation support for the Rust plugin. The update enables snapcraft snap --target-arch functionality for Rust-based parts.
qwen3.6-35b-a3b-mtp-q6 Merged after maintainer review, adding cross-compilation support for the Rust plugin in snapcraft to enable snapcraft snap --target-arch=.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1338 go plugin: Add support for cross-compilation snapcraft merged Merged after approval, enabling cross-compilation for the Go plugin via snapcraft's --target-arch flag. Six files were modified with 144 additions and 11 deletions.
77%
#1015 rust plugin does not cross-compile craft-parts 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.
75%
#2454 baseplugin: add a proper exception for cross-compilation support snapcraft merged Merged changes add a proper exception to notify users when cross-compilation is used with unsupported plugins. Approved, passed CI, and achieved 100% diff coverage. Resolves SNAPCRAFT-95, SNAPCRAFT-AQ, and LP: #1808454.
72%
#2693 rust plugin: support for s390x snapcraft merged Added s390x architecture support to the Rust plugin and merged. Approved by reviewer, passed CI checks, and modified three files with minimal changes. Coverage increased slightly.
72%
#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.
70%