-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makefiles/cargo: Remove CARGO_CHANNEL and other simplifications #20319
Merged
benpicco
merged 8 commits into
RIOT-OS:master
from
chrysn-pull-requests:rust-simplifications
Feb 2, 2024
Merged
makefiles/cargo: Remove CARGO_CHANNEL and other simplifications #20319
benpicco
merged 8 commits into
RIOT-OS:master
from
chrysn-pull-requests:rust-simplifications
Feb 2, 2024
Conversation
This file contains 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
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.
chrysn
added
Area: build system
Area: Build system
Area: Rust
Area: Rust wrapper
labels
Jan 31, 2024
chrysn
requested review from
leandrolanzieri,
aabadie,
MichelRottleuthner and
jia200x
as code owners
January 31, 2024 11:26
chrysn
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Jan 31, 2024
github-actions
bot
added
Area: doc
Area: Documentation
Area: tests
Area: tests and testing framework
Area: examples
Area: Example Applications
labels
Jan 31, 2024
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.
chrysn
force-pushed
the
rust-simplifications
branch
from
January 31, 2024 15:13
05a2b63
to
740f7c7
Compare
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
Now it seems to work just fine! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: build system
Area: Build system
Area: doc
Area: Documentation
Area: examples
Area: Example Applications
Area: Rust
Area: Rust wrapper
Area: sys
Area: System
Area: tests
Area: tests and testing framework
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
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 usingtest
andbench
because they are special cases to Cargo;rm -rf bin
inbetween 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 beta
in the directory of an example and run it there; you'll see everything recompiling because a different compiler is now used, andmake info-rust
shows the beta version (beware this persists, sorustup override remove
later)[toolchain]
/channel = "nightly"
into rust-toolchain.toml to have a locally visible override.