Rust plugin: rewrite the Rust plugin for core20
Metadata
Current evaluation
Merged as snapcore/snapcraft#4297 (b357ef5e7): added a core20 Rust plugin on the new plugin system with LTO, toolchain selection, and default-feature controls.
Resolution: closed resolved
Reason: PR #4297 was merged as commit b357ef5e7, delivering the requested core20 Rust plugin rewrite. The related craft-parts#530 rewrite was cited during review, but #4297 was ultimately implemented and merged separately.
Evaluated by: mr-cal-bot
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] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
This pull request migrates the Rust plugin to the new plugin system and also makes it more intelligent.
Three new options have been added:
- One option for enabling LTO (more optimized binary)
- One option for specifying Rust toolchain channel/version
- One option for disabling default features in the Rust crate
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged as snapcore/snapcraft#4297 (b357ef5e7): added a core20 Rust plugin on the new plugin system with LTO, toolchain selection, and default-feature controls. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged as b357ef5e7 ("feat(plugins): add rustup support and more config options (#4297)"), adding a core20 Rust plugin on the new plugin system with LTO, rust-channel and rust-no-default-features options. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #4297 as b357ef5e7, adding a core20 Rust plugin on the new plugin system with LTO, toolchain selection and default-feature controls. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a core20 Rust plugin rewrite migrating to the new plugin system. Added LTO support, custom toolchain channel selection, and default feature disabling. Resolved test mocking issues and CI feedback prior to merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged after rewriting the Rust plugin for core20 to use the new plugin system. Added LTO, toolchain, and default feature options. Corrected incorrect function mocking in tests and rebased against main before final merge. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/craft-parts#530
(confidence 98%)
The maintainer cited this parallel craft-parts Rust plugin rewrite during review.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1606812 Add plugin rust | snapcraft (launchpad) | closed | Rust plugin request implemented: snapcore/snapcraft#579 by ~sergiusens merged as commit 24f1def33, adding the Rust plugin. Launchpad ticket #1606812 closed once the plugin landed. | |
| #530 plugins/rust_plugin: rewrite the plugin to improve UX | craft-parts | merged | Merged via commit 939e6d77, rewriting the Rust plugin to install Rustup by default and adding LTO, toolchain-channel, and default-feature controls. | |
| #3079 cli: add plugin help for core20 | snapcraft | merged | Merged in canonical/snapcraft#3079 (04bf14915), adding core20 plugin help, Click paging, Python/nil v2 help fixes, and a core20 base fallback. | |
| #2158 rust plugin: fix cargo builds and run tests | snapcraft | closed | PR closed as superseded: the rust-plugin-improvements branch was deleted and the work was reworked and merged as snapcore/snapcraft#2170 (commit 4f80a1051) after cargo test broke cross-compilation. | |
| #579 Add new plugin: rust | snapcraft | merged | Merged PR #579 as commit 24f1def33, adding Snapcraft's Rust plugin, resolving conflicts, and updating plugin-list test expectations. | |
| #1842328 snapcraft make plugin does not support core20 | snapcraft (launchpad) | closed | Core20 support for the make plugin landed via snapcore/snapcraft#2761 (commit 144814b29), superseding #2757 and unblocking UC20 gadget builds. | |
| #198 plugins: rust | craft-parts | merged | Merged PR #198 (bb92a132) ported Snapcraft’s Rust plugin into craft-parts for CRAFT-955 after prerequisite test refactor #199. |