apps/rust: Add dependencies for Rust cargo in make builds#3522
Merged
Conversation
Add a Rust make helper that collects crate input files, and use it for the Rust hello and slint examples. This makes the generated Rust static libraries depend on the crate sources, manifests, build scripts. Hook the libraries into both context and all, so re-running make after editing Rust inputs rebuilds the crate. Signed-off-by: Shoji Tokunaga <toku@mac.com>
2 tasks
xiaoxiang781216
approved these changes
Jun 4, 2026
acassis
approved these changes
Jun 4, 2026
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.
Summary
This updates the Rust example Makefiles so Cargo builds participate in normal Make dependency tracking.
The change adds a
RUST_CARGO_SRCShelper intools/Rust.mkto collect crate input files. ThehelloandslintRust examples now use that file list as prerequisites for their generated static libraries.The examples also hook the generated Rust library into both
contextandall.As a result, editing Rust sources, manifests, build scripts, causes Cargo to rebuild when
makeis run again.Testing
I confirm that changes are verified on local setup and works as intended:
Configuration and Build:
PR verification Self-Check