From db68561fdc5c8a32e4c1f7b9b8d6d4de4769ec43 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 10 Sep 2026 16:00:59 -0700 Subject: [PATCH] chore: release v2.2.0 A minor: adds public items and moves none, and cargo-semver-checks agrees. Added since 2.1.0: - `--cfg ra_generic_collect`, so a bare-metal firmware can move the periodic collect heartbeat. `options::set` is a no-op under ONE_REGION, so this was the one lever over a real trade that a firmware could not reach. - `prim::fixed::shape_of(size) -> Shape` -- page bytes, dedicated segments and `direct_route`, all const. `direct_route` names a boundary that moves with POINTER WIDTH (`SMALL_SIZE_MAX` is `128 * size_of::()`), which is why a sweep can look flat on a workstation and step on a 32-bit device. Fixed, and it is the largest embedded speed change in this series: - Under `--cfg ra_small_profile` every page was extended ONE BLOCK AT A TIME. `page_extend`'s 4 KiB payload bound used a hardcoded shift whose constant is really SEGMENT_SLICE_SIZE/4096 -- right at the 64 KiB slice, sixteen times too small at the small profile's 4 KiB one. A 512 B class computed a batch of 0, clamped to 1, so every page carried capacity == 1 and `malloc_generic` ran on 100% of allocations. Counted: generic/op 1.0000 -> 0.1250 at 512 B. On a XIAO ESP32-S3, one board and one session with identical checksums: 13-16% faster on every binned workload. Default geometry byte-identical. Co-Authored-By: Claude Opus 5 (1M context) --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- README.md | 10 +++++++--- crates/rusty_alloc/CHANGELOG.md | 2 ++ crates/rusty_alloc_api/Cargo.toml | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 29716fd..a850d7f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,7 +275,7 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "rusty_alloc" -version = "2.1.0" +version = "2.2.0" dependencies = [ "libc", "loom", @@ -286,14 +286,14 @@ dependencies = [ [[package]] name = "rusty_alloc-api" -version = "2.1.0" +version = "2.2.0" dependencies = [ "rusty_alloc", ] [[package]] name = "rusty_alloc-bench" -version = "2.1.0" +version = "2.2.0" dependencies = [ "libloading", "rusty_alloc", @@ -302,14 +302,14 @@ dependencies = [ [[package]] name = "rusty_alloc-ffi" -version = "2.1.0" +version = "2.2.0" dependencies = [ "rusty_alloc", ] [[package]] name = "rusty_alloc-override" -version = "2.1.0" +version = "2.2.0" dependencies = [ "rusty_alloc", "rusty_alloc-ffi", @@ -317,7 +317,7 @@ dependencies = [ [[package]] name = "rusty_alloc-wasm" -version = "2.1.0" +version = "2.2.0" dependencies = [ "rusty_alloc", ] diff --git a/Cargo.toml b/Cargo.toml index bcdc5ca..3467311 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -132,7 +132,7 @@ members = [ # different files that never got the section. Fixed here, in both, and # verified by extracting the packaged `.crate` before publishing rather than # checking the live page afterwards. -version = "2.1.0" +version = "2.2.0" edition = "2024" # MSRV. Declared for the first time in 1.0.1 because this release genuinely # needs it: `asm!` label blocks (`asm_goto`, stable 1.87) carry the free path's diff --git a/README.md b/README.md index e0d0092..2531a70 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,13 @@ does not offer. measured on a XIAO ESP32-S3 at 240 MHz, both allocators built from one source. It costs more RAM to get that (64 KiB vs 8 KiB); both numbers are below. -> **Status: `2.1.0`.** The API is frozen and changes follow semver. 2.0.1 -> through 2.0.5 were patch releases; **2.1.0 is a minor because it ADDS public -> items and moves nothing** — `cargo-semver-checks` calls it API-compatible. +> **Status: `2.2.0`.** The API is frozen and changes follow semver. 2.0.1 +> through 2.0.5 were patch releases; 2.1.0 and 2.2.0 are minors because they +> ADD public items and move none — `cargo-semver-checks` calls both +> API-compatible. **2.2.0 also carries the largest embedded speed fix in this +> series:** under `--cfg ra_small_profile` every page was being extended one +> block at a time, so `malloc_generic` ran on 100 % of allocations; on a XIAO +> ESP32-S3 fixing it is **13–16 % faster on every binned workload**. > 2.0.2 halved the allocator's flash cost on a microcontroller and cut its > gzipped wasm overhead by a third; 2.0.3 halved the flash cost again and took > the static RAM cost from 3 KB to under 300 bytes; 2.0.4 makes a firmware's diff --git a/crates/rusty_alloc/CHANGELOG.md b/crates/rusty_alloc/CHANGELOG.md index f743bcd..6178b10 100644 --- a/crates/rusty_alloc/CHANGELOG.md +++ b/crates/rusty_alloc/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.2.0](https://github.com/Remade-With-Rust/rusty_alloc/compare/rusty_alloc-v2.1.0...rusty_alloc-v2.2.0) - 2026-09-10 + ### Fixed - **The small profile extended every page ONE BLOCK AT A TIME, so 100 % of diff --git a/crates/rusty_alloc_api/Cargo.toml b/crates/rusty_alloc_api/Cargo.toml index 309e647..83d78e9 100644 --- a/crates/rusty_alloc_api/Cargo.toml +++ b/crates/rusty_alloc_api/Cargo.toml @@ -14,7 +14,7 @@ readme = "README.md" [dependencies] # A published crate needs a VERSION alongside the path: the path is what the # workspace builds against, the version is what crates.io resolves. -rusty_alloc = { path = "../rusty_alloc", version = "2.1.0", default-features = false } +rusty_alloc = { path = "../rusty_alloc", version = "2.2.0", default-features = false } [features] # Mirrors the core's (P3, docs/plans/small-metal.md). Default-on, so every