makefiles/cargo: Remove CARGO_CHANNEL and other simplifications#20319
Merged
benpicco merged 8 commits intoRIOT-OS:masterfrom Feb 2, 2024
Merged
makefiles/cargo: Remove CARGO_CHANNEL and other simplifications#20319benpicco merged 8 commits intoRIOT-OS:masterfrom
benpicco merged 8 commits intoRIOT-OS:masterfrom
Conversation
Back when specific control of the Rust version used with RIOT was needed, CARGO_CHANNEL was added to explicitly set the Rust version with consideration for CI special cases. Rust's mechansims of selecting a toolchain can be used instead now.
The checks would print their prominently colored warnings and confuse users, and the comments are more geared to those editing the Makefiles than to those watching which commands get executed.
05a2b63 to
740f7c7
Compare
Member
Author
|
The last change (the additions to info-rust) will need some extension when RIOT-OS/rust-riot-wrappers#79 is merged; if that overtakes this PR, I'll update in-place. [edit: Now updated]. |
This pulls in embedded-nal 0.7 implementations, and (on both crates) alterations that decouple riot-wrappers from riot-sys and simplify build system integration, and do away with the need for passing RIOT_USEMODULE.
The latest versions of riot-wrappers and riot-sys do not require it any more, and the exported data from info-rust is thus much more stable.
benpicco
approved these changes
Feb 2, 2024
Contributor
|
Now it seems to work just fine! |
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.
Contribution description
The Rust makefiles contain some stuff that is needlessly complex and was necessary due to earlier Rust versions that have long been unsupported. This cleans them up; see individual commits for details.
Testing procedure
Apart from CI, I tested:
in examples/rust-hello-world:
make BOARD=microbit-v2 CARGO_PROFILE=dev, with profile values also usingtestandbenchbecause they are special cases to Cargo;rm -rf bininbetween to see it's not tapping into old existing files. To testCARGO_PROFILE=foo, add this to Cargo.toml:Any of the examples can still just be built, but you can also
rustup override set betain the directory of an example and run it there; you'll see everything recompiling because a different compiler is now used, andmake info-rustshows the beta version (beware this persists, sorustup override removelater)[toolchain]/channel = "nightly"into rust-toolchain.toml to have a locally visible override.