← Back to issue list

Fix issue where Rust cross compile target is ignored

View original Github issue

Metadata

Project
snapcraft
Number
#2264
Type
pull request
State
merged
Author
eberkund
Labels
Created
Updated
Closed

Current evaluation

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.

Suggested action:

No scores available.

Issue body

- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh tests/unit`? I have tested that I can still compile the snap for my native arch and as well as fixing the issue I was having. Please see https://forum.snapcraft.io/t/bug-rust-plugin-not-using-correct-pkg-config-path/7302/4 for more information.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b 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.
qwen3.6-35b-a3b-mtp-q6 Merged fix for Rust cross-compilation target being ignored. The change ensures .cargo/config is only generated when absent, preserving existing project configurations. Tests passed and coverage increased.
qwen3.6-35b-a3b-mtp-q6 Merged fix for Rust cross-compile target being ignored. Updated to only generate .cargo/config when absent, preserving existing project configurations.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#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.
72%
#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.
70%