-
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
Rust: Add make cargo-command
and refactoring around it
#20828
Merged
chrysn
merged 5 commits into
RIOT-OS:master
from
chrysn-pull-requests:cargo-customization
Aug 23, 2024
Merged
Rust: Add make cargo-command
and refactoring around it
#20828
chrysn
merged 5 commits into
RIOT-OS:master
from
chrysn-pull-requests:cargo-customization
Aug 23, 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
chrysn
added
Area: build system
Area: Build system
Area: Rust
Area: Rust wrapper
labels
Aug 21, 2024
chrysn
force-pushed
the
cargo-customization
branch
from
August 21, 2024 20:52
e1fed88
to
0f8535e
Compare
benpicco
added
the
CI: ready for build
If set, CI server will compile all applications for all available boards for the labeled PR
label
Aug 21, 2024
maribu
approved these changes
Aug 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks pretty helpful :)
Please squash! |
Examples of executed commands are `cargo check`, `cargo fix` or `cargo doc`.
The options passed to cargo are not universal, and thus can not apply to all commands as was previously documented.
This simplifies the explanation of what might need adjustments depending on which cargo command is invoked.
chrysn
force-pushed
the
cargo-customization
branch
from
August 22, 2024 13:18
2cb8f5e
to
4beff4e
Compare
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Aug 22, 2024
chrysn
added a commit
to RIOT-OS/rust-documentation-builder
that referenced
this pull request
Aug 23, 2024
… into internals See-Also: RIOT-OS/RIOT#20828
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: Rust
Area: Rust wrapper
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
Users who want to do more than just use cargo to build their RIOT application (say, run the linter
cargo check
with the right settings, runcargo fix
, the advanced linterclippy
, or build documentation) previously had to extract the relevant environment variables and command line extras frommake info-rust
.In particular, that was hard to integrate in CI – for example, to run the linter in strict mode on your application.
The newly introduced
make cargo-command CARGO_COMMAND="cargo clippy"
family (where the content for CARGO_COMMAND is run with all the right setup) closes this gap.Testing procedure
make -C examples/rust-gcoap cargo-command CARGO_COMMAND="cargo check --release"
may show warnings, but completes successfully.Issues/PRs references
This may also contribute to #20088 (thus CC'ing @derMihai).
It also helps with the follow-up of RIOT-OS/rust-riot-wrappers#105, making the warnings easier to show, and even to fix by picking
cargo fix
orcargo clippy --fix
.