From 6bca0e89337d8b59e2fabae9475bbbadda1a6d48 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 9 Sep 2026 06:26:04 -0700 Subject: [PATCH] chore: release v2.0.2 Patch release: no public API moved. - `--cfg ra_single_threaded` now prunes the cross-thread machinery a single context can never reach; guarded-object sampling is compiled out where no guard page can exist. ESP32-S3 flash cost +16,584 -> +7,860 B; the wasm self-test module 22,574 -> 20,169 gzipped bytes; a minimal wasm consumer's overhead over dlmalloc +3,829 -> +2,435 gzipped bytes (this commit's README row, measured against an unchanged base). - `--features linkcheck` without `secure` compiles again; CI clippies each optional feature alone. - A layout-dependent `prim::fixed` test is two-sided. Version bump, lockfile and changelog header as release-plz generated them; the generated changelog bullets are dropped in favour of the hand-written sections they duplicated, as for 2.0.1. README status line and wasm table updated. Co-Authored-By: Claude Fable 5.1 --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- README.md | 26 ++++++++++++++++++++------ crates/rusty_alloc/CHANGELOG.md | 2 ++ crates/rusty_alloc_api/Cargo.toml | 2 +- 5 files changed, 30 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 147b5a2..bdc1974 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -275,7 +275,7 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "rusty_alloc" -version = "2.0.1" +version = "2.0.2" dependencies = [ "libc", "loom", @@ -286,14 +286,14 @@ dependencies = [ [[package]] name = "rusty_alloc-api" -version = "2.0.1" +version = "2.0.2" dependencies = [ "rusty_alloc", ] [[package]] name = "rusty_alloc-bench" -version = "2.0.1" +version = "2.0.2" dependencies = [ "libloading", "rusty_alloc", @@ -302,14 +302,14 @@ dependencies = [ [[package]] name = "rusty_alloc-ffi" -version = "2.0.1" +version = "2.0.2" dependencies = [ "rusty_alloc", ] [[package]] name = "rusty_alloc-override" -version = "2.0.1" +version = "2.0.2" dependencies = [ "rusty_alloc", "rusty_alloc-ffi", @@ -317,7 +317,7 @@ dependencies = [ [[package]] name = "rusty_alloc-wasm" -version = "2.0.1" +version = "2.0.2" dependencies = [ "rusty_alloc", ] diff --git a/Cargo.toml b/Cargo.toml index 7a1743a..e96069c 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.0.1" +version = "2.0.2" 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 1e66d58..ff37f25 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,19 @@ does not offer. cross-thread path and abort. - **~150 of mimalloc's ~157 `mi_*` entry points**, gated against the C implementation as a differential oracle on every change. -- **Runs on WebAssembly** with no C toolchain and no emscripten, and **2.0.0 - halves what it adds to a gzipped bundle** (+7,760 -> +3,829 bytes on a minimal - module) — see [Shipping it to a browser](#shipping-it-to-a-browser). +- **Runs on WebAssembly** with no C toolchain and no emscripten, and **two + releases have cut what it adds to a gzipped bundle by two thirds** (+7,760 -> + +3,829 -> +2,435 bytes on a minimal module) — see + [Shipping it to a browser](#shipping-it-to-a-browser). - **Runs on a microcontroller, and is 2.0-3.7x faster than `esp-alloc` there** — measured on a XIAO ESP32-S3 at 240 MHz, both allocators built from one source. It costs more RAM to get that (68 KiB vs 8 KiB); both numbers are below. -> **Status: `2.0.0`.** The API is frozen and changes follow semver. +> **Status: `2.0.2`.** The API is frozen and changes follow semver. 2.0.1 and +> 2.0.2 are patch releases: no public API moved. 2.0.2 halves the allocator's +> flash cost on a microcontroller and cuts its gzipped wasm overhead by a third +> (see [Embedded](#embedded-bare-metal-measured-on-silicon) and +> [Shipping it to a browser](#shipping-it-to-a-browser)). > > **What breaks, and why it is a major.** Two things, neither of which touches a > consumer on default features: `default-features = false` now selects the @@ -357,13 +362,22 @@ you the wrong one. ## Shipping it to a browser An integrator reported `rusty_alloc` adding ~12 % to their gzipped wasm bundle. -It was measured, and most of it is gone in 2.0.0. +It was measured, and most of it is gone: half in 2.0.0, another third of what +was left in 2.0.2. | | raw | gzip | overhead vs the Rust default | |---|---:|---:|---:| | dlmalloc (Rust default for wasm32) | 15,536 | 6,706 | — | | rusty_alloc 1.1.x | 34,285 | 14,466 | +7,760 | -| **rusty_alloc 2.0.0** | **25,734** | **10,535** | **+3,829** | +| rusty_alloc 2.0.0 | 25,734 | 10,535 | +3,829 | +| **rusty_alloc 2.0.2** | **22,550** | **9,141** | **+2,435** | + +The 2.0.2 row is the embedded work paying off elsewhere: `wasm32-unknown-unknown` +without the atomics feature has one thread by construction, so the same +predicate that prunes the cross-thread machinery from a microcontroller image +prunes it here too, and guarded-object sampling — which needs an MMU wasm does +not have — no longer ships at all. The base row was rebuilt for this +measurement and did not move. Measured on a minimal consumer built the way you would ship it (`opt-level="z"`, `lto="fat"`, `panic="abort"`, `strip`), attributed by a set difference against diff --git a/crates/rusty_alloc/CHANGELOG.md b/crates/rusty_alloc/CHANGELOG.md index 787be08..c959204 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.0.2](https://github.com/Remade-With-Rust/rusty_alloc/compare/rusty_alloc-v2.0.1...rusty_alloc-v2.0.2) - 2026-09-09 + ### Changed - **Firmware code size halved: `--cfg ra_single_threaded` now prunes what it diff --git a/crates/rusty_alloc_api/Cargo.toml b/crates/rusty_alloc_api/Cargo.toml index 7d9d1d7..ff54d7f 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.0.1", default-features = false } +rusty_alloc = { path = "../rusty_alloc", version = "2.0.2", default-features = false } [features] # Mirrors the core's (P3, docs/plans/small-metal.md). Default-on, so every