fix(rust): immediate-abort via Cargo.toml profile (host-safe)#247
Merged
Conversation
Select the immediate-abort panic strategy the canonical way on nightly-2025-12-05: cargo-features = ["panic-immediate-abort"] plus [profile.release] panic = "immediate-abort", instead of the device-target rustflags (-C panic=immediate-abort / -Z unstable-options). Move build-std out of .cargo/config.toml into the device build command (cargo build -Z build-std=core ...) so the host clippy/test jobs (now on nightly) don't rebuild host core. Bump rust-toolchain to nightly-2025-12-05 (the cargo-features gate needs a nightly cargo) and add clippy/rustfmt components. Mirrors Zondax/ledger-icp #332.
chcmedeiros
force-pushed
the
fix/immediate-abort-cargo-profile
branch
from
June 22, 2026 15:52
d080b50 to
2f34725
Compare
emmanuelm41
approved these changes
Jun 22, 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.
What
Selects the immediate-abort panic strategy the canonical way for
nightly-2025-12-05, and keeps the host CI jobs cheap by not rebuilding hostcore.Changes (4 files)
app/rust/Cargo.toml: addcargo-features = ["panic-immediate-abort"]as the first line andpanic = "immediate-abort"under[profile.release].[profile.dev]'spanic = "abort"is unchanged.app/rust/.cargo/config.toml: drop[unstable] build-std=["core"]and remove the-Z unstable-options/-C panic=immediate-abortflags from the device-target rustflags. All other rustflags (--emit asm,relocation-model=ropi, link args) are kept.app/Makefile.rust: the device build now passes-Z build-std=coreon the command line (cargo build -Z build-std=core --target ... --release).app/rust/rust-toolchain.toml: channel1.83.0→nightly-2025-12-05; components gainclippyandrustfmt.Why
cargo-features = ["panic-immediate-abort"]+[profile.release] panic = "immediate-abort"is the canonical way to select the immediate-abort panic strategy onnightly-2025-12-05(the old-C panic=immediate-abortrustflag /panic_immediate_abortbuild-std feature path no longer applies). Movingbuild-stdfromconfig.tomlinto the device build command means the hostclippy/testjobs (now on nightly) don't rebuild hostcore. The toolchain moves to nightly because thecargo-featuresgate requires a nightly cargo.