From 84fefe54ed92644c1ec13420ce539656b3c49576 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Sun, 27 Sep 2026 02:18:25 +0100 Subject: [PATCH 1/3] Swap to rustc feature allocator_ext instead of allocator_api --- examples/allocator_api.rs | 4 ++-- examples/llff_integration_test.rs | 2 +- examples/tlsf_integration_test.rs | 2 +- src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/allocator_api.rs b/examples/allocator_api.rs index 02211ce..adca484 100644 --- a/examples/allocator_api.rs +++ b/examples/allocator_api.rs @@ -1,5 +1,5 @@ //! This examples requires nightly for the allocator API. -#![feature(allocator_api)] +#![feature(allocator_ext)] #![no_std] #![no_main] @@ -11,7 +11,7 @@ use cortex_m_rt::entry; use defmt_semihosting as _; use embedded_alloc::LlffHeap as Heap; -// This is not used, but as of 2023-10-29 allocator_api cannot be used without +// This is not used, but as of 2023-10-29 allocator_ext cannot be used without // a global heap #[global_allocator] static HEAP: Heap = Heap::empty(); diff --git a/examples/llff_integration_test.rs b/examples/llff_integration_test.rs index edf3220..ae7238f 100644 --- a/examples/llff_integration_test.rs +++ b/examples/llff_integration_test.rs @@ -12,7 +12,7 @@ //! //! [Embedded Rust Book]: https://docs.rust-embedded.org/book/intro/index.html -#![feature(allocator_api)] +#![feature(allocator_ext)] #![no_main] #![no_std] diff --git a/examples/tlsf_integration_test.rs b/examples/tlsf_integration_test.rs index 7a911e7..7490c02 100644 --- a/examples/tlsf_integration_test.rs +++ b/examples/tlsf_integration_test.rs @@ -12,7 +12,7 @@ //! //! [Embedded Rust Book]: https://docs.rust-embedded.org/book/intro/index.html -#![feature(allocator_api)] +#![feature(allocator_ext)] #![no_main] #![no_std] diff --git a/src/lib.rs b/src/lib.rs index 89cf297..9263c68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ #![doc = include_str!("../README.md")] #![no_std] -#![cfg_attr(feature = "allocator_api", feature(allocator_api))] +#![cfg_attr(feature = "allocator_api", feature(allocator_ext))] #![warn(missing_docs)] #[cfg(feature = "llff")] From 06953874d7604b1c09083dc5a3e79c2c6530d894 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Sun, 27 Sep 2026 03:05:11 +0100 Subject: [PATCH 2/3] Remove feature(allocator_api) from lib and some examples --- examples/allocator_api.rs | 1 - examples/llff_integration_test.rs | 1 - src/lib.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/examples/allocator_api.rs b/examples/allocator_api.rs index adca484..5074ed2 100644 --- a/examples/allocator_api.rs +++ b/examples/allocator_api.rs @@ -1,5 +1,4 @@ //! This examples requires nightly for the allocator API. -#![feature(allocator_ext)] #![no_std] #![no_main] diff --git a/examples/llff_integration_test.rs b/examples/llff_integration_test.rs index ae7238f..0c4697a 100644 --- a/examples/llff_integration_test.rs +++ b/examples/llff_integration_test.rs @@ -12,7 +12,6 @@ //! //! [Embedded Rust Book]: https://docs.rust-embedded.org/book/intro/index.html -#![feature(allocator_ext)] #![no_main] #![no_std] diff --git a/src/lib.rs b/src/lib.rs index 9263c68..5719737 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![doc = include_str!("../README.md")] #![no_std] -#![cfg_attr(feature = "allocator_api", feature(allocator_ext))] #![warn(missing_docs)] #[cfg(feature = "llff")] From 7e1603d07aa4f968ba7bf82252c4d55da7035195 Mon Sep 17 00:00:00 2001 From: Adam Greig Date: Sun, 27 Sep 2026 12:28:18 +0100 Subject: [PATCH 3/3] Update examples/allocator_api.rs Co-authored-by: Soso <51865119+sgued@users.noreply.github.com> --- examples/allocator_api.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/allocator_api.rs b/examples/allocator_api.rs index 5074ed2..a4a9916 100644 --- a/examples/allocator_api.rs +++ b/examples/allocator_api.rs @@ -10,7 +10,7 @@ use cortex_m_rt::entry; use defmt_semihosting as _; use embedded_alloc::LlffHeap as Heap; -// This is not used, but as of 2023-10-29 allocator_ext cannot be used without +// This is not used, but as of 2026-09-27 `alloc` collections cannot be used without it, even when using only a local allocator. // a global heap #[global_allocator] static HEAP: Heap = Heap::empty();