0.7.8 changed singleton! from $crate::interrupt::free to $crate::_export::critical_section::with. The macro expands in dependent crates, so any published crate using singleton! now needs a critical-section 1.x implementation linked into the final binary. Graphs that never enable critical-section-single-core (or another provider) fail with:
rust-lld: error: undefined symbol: _critical_section_1_0_acquire
Since cortex-m = "0.7" dependents pick up patch releases automatically, this breaks already-published libraries at link time. Observed breaking atsamd-rs CI (Tier 2 boards on atsamd-hal 0.14, singleton! in the USB stack). Repro:
cd boards/trinket_m0 && cargo update && cargo build --examples --all-features --target thumbv6m-none-eabi on atsamd-rs/atsamd master; passes with cargo update -p cortex-m --precise 0.7.7.
Suggest reverting singleton! to interrupt::free in a 0.7.9 and keeping the critical-section-based form for 0.8+, where it's a documented requirement.
0.7.8 changed
singleton!from$crate::interrupt::freeto$crate::_export::critical_section::with. The macro expands in dependent crates, so any published crate usingsingleton!now needs a critical-section 1.x implementation linked into the final binary. Graphs that never enable critical-section-single-core (or another provider) fail with:rust-lld: error: undefined symbol: _critical_section_1_0_acquireSince cortex-m = "0.7" dependents pick up patch releases automatically, this breaks already-published libraries at link time. Observed breaking atsamd-rs CI (Tier 2 boards on atsamd-hal 0.14,
singleton!in the USB stack). Repro:cd boards/trinket_m0 && cargo update && cargo build --examples --all-features --target thumbv6m-none-eabion atsamd-rs/atsamd master; passes withcargo update -p cortex-m --precise 0.7.7.Suggest reverting singleton! to interrupt::free in a 0.7.9 and keeping the critical-section-based form for 0.8+, where it's a documented requirement.