diff --git a/makefiles/cargo-settings.inc.mk b/makefiles/cargo-settings.inc.mk index 3f4c1a8a2e..4202113b51 100644 --- a/makefiles/cargo-settings.inc.mk +++ b/makefiles/cargo-settings.inc.mk @@ -30,7 +30,7 @@ CARGO_TARGET_DIR = $(BINDIR)/target # directory with the same name as the profile". CARGO_LIB = $(CARGO_TARGET_DIR)/$(RUST_TARGET)/$(patsubst test,debug,$(patsubst dev,debug,$(patsubst bench,release,${CARGO_PROFILE})))/lib$(APPLICATION_RUST_MODULE).a -# Options passed into all Cargo commands, in particular to the build command. +# Options passed into the Cargo build command. # # Most of these are populated by RIOT modules that are backed by Rust. Popular # options added by the user are `-Zbuild-std=core` (only available on nightly) diff --git a/makefiles/info.inc.mk b/makefiles/info.inc.mk index d9a09a4ef8..271a428313 100644 --- a/makefiles/info.inc.mk +++ b/makefiles/info.inc.mk @@ -250,8 +250,9 @@ info-rust: cargo version c2rust --version @echo "To use this setup of Rust in an IDE, add these command line arguments to the \`cargo check\` or \`rust-analyzer\`:" - @echo " --target $(RUST_TARGET) --profile $(CARGO_PROFILE)" + @echo " --target $(RUST_TARGET) --profile $(CARGO_PROFILE) $(CARGO_OPTIONS)" @echo "and export these environment variables:" @echo " RIOT_COMPILE_COMMANDS_JSON=\"$(CARGO_COMPILE_COMMANDS)\"" @echo " RIOTBUILD_CONFIG_HEADER_C=\"$(RIOTBUILD_CONFIG_HEADER_C)\"" - @echo "You can also call cargo related commands with \`make cargo-command CARGO_COMMAND="cargo check"\`; beware that the way the profile is passed in is not consistent across cargo commands, and adding \`--profile $(CARGO_PROFILE)\` as part of CARGO_COMMAND may be necessary." + @echo "You can also call cargo related commands with \`make cargo-command CARGO_COMMAND=\"cargo check\"\`." + @echo "Beware that the way the profile and other flags are passed in is not consistent across cargo commands, so adding \`--profile $(CARGO_PROFILE)\` or other flags from above as part of CARGO_COMMAND may be necessary."