Skip to content

fix: support current Rust toolchains - #632

Merged
ArthurGibert merged 2 commits into
mainfrom
fix/panic-immediate-abort
Aug 14, 2026
Merged

fix: support current Rust toolchains#632
ArthurGibert merged 2 commits into
mainfrom
fix/panic-immediate-abort

Conversation

@chmanie

@chmanie chmanie commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • migrate package-local build-std configuration to the current nightly immediate-abort panic strategy
  • keep the workspace manifest compatible with stable Cargo used by CI and releases
  • fix the current-nightly MIDI packet Clippy lint

Supersedes #611.

Verification

  • latest nightly: formatting, firmware/libfp Clippy, libfp tests, firmware release build, and UF2 generation
  • latest stable: formatting, firmware/libfp Clippy, libfp tests, and firmware release build

Hardware test

  • Flash firmware and confirm the firmware boots normally

@ArthurGibert ArthurGibert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrates panic_immediate_abort to the syntax current nightly requires, and swaps chunks_exact(4)as_chunks::<4>() in midi.rs. Confirmed necessary (the old config fails to compile core on current nightly — reproduced directly) and confirmed correct (as_chunks behavior is identical to chunks_exact, zero-cost per asm diff; the new alloc build-std addition is genuinely required by postcard-bindgen-core, not scope creep).

Worth addressing before merge: the new config hard-fails on stable Cargo, where the old one silently no-op'd and still produced a working (larger) binary — reproduced directly both ways. There's no rust-toolchain.toml anywhere in the repo pinning nightly for the faderpunk package, and gen-bindings.sh has to say cargo +nightly explicitly, implying bare cargo resolves to stable here. That risks breaking the documented cd faderpunk && cargo build --release / ./build-uf2.sh workflow for anyone without a personal rustup override already set. Suggest adding a rust-toolchain.toml pinning nightly for faderpunk/.

Worth knowing, not blocking:

  • Because .cargo/config.toml is scoped to faderpunk/, CI/release builds (which run from repo root) never see this fix at all — this PR only affects the local build-uf2.sh dev path.
  • panic = "immediate-abort" makes ordinary app panics compile to silent traps with no defmt/RTT output — pre-existing, not introduced here, but worth a code comment given how much it undermines local debugging.
  • A release-build rust-lld alignment warning showed up during testing — almost certainly the same pre-existing issue #614 fixes independently, not new here.

@chmanie
chmanie force-pushed the fix/panic-immediate-abort branch from 60829e7 to 0bdae1c Compare August 14, 2026 09:37
@chmanie
chmanie force-pushed the fix/panic-immediate-abort branch from 0bdae1c to ad310a6 Compare August 14, 2026 09:37
@ArthurGibert
ArthurGibert merged commit 25546b5 into main Aug 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants