v1.0.0 - Stable #9
jamesgober
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Release Notes for v1.0.0 - Stable
Version 1.0.0 - 2026-05-18
API-compatible with
0.9.11. Callers on0.9.11upgrade by bumping the version string inCargo.tomland nothing else. Callers still on0.9.6or earlier should readdocs/MIGRATION_0.9_TO_1.0.mdfor the recovery path.What ships in 1.0.0
AnonymousMmap::new(size)returns a process-local, RW memory region with no backing file. Pages are zero-initialized on first touch; memory is released when the value drops. Useful for shared scratch memory between threads, large temporary allocations that bypass the heap, or as the kernel-side substrate for fd-passing IPC patterns. Closes audit F1, the longest-standing gap in the inventory.mmap.is_hugepage_backed() -> Option<bool>answers the question "did the kernel actually back my mapping with huge pages?" On Linux, parses/proc/self/smapsand inspects theAnonHugePages/Private_Hugetlb/Shared_Hugetlbfields. On other platforms returnsNone. Pairs with the existinghugepagesfeature to close the loop on a previously best-effort capability. Closes audit F4.tests/ipc_cross_process.rsverifies bidirectional cross-process byte visibility through a single mmap'd file: parent writes a magic value, spawns child viastd::process::Command::new(std::env::current_exe()), child reads parent's writes and writes its own bytes, parent verifies the child's writes. The crate has always supported this pattern; now it has a dedicated regression test. Closes audit T6.create_rwandopen_or_createnow explicitly document thatset_len(size)produces a sparse file on every supported platform: a 1 TBdefault_sizedoes not consume 1 TB of free disk until pages are written. Closes audit F6.# Errors/# Panicsrustdoc completeness pass. EveryResult-returning public method now documents its error conditions; every method that calls.expect()documents its panic conditions. The crate already enforced#![deny(missing_docs)]; nowclippy::missing_errors_docandclippy::missing_panics_docalso pass clean.public-api.txtsnapshot committed. Acargo public-api --simplified --all-featuresdump of the locked surface lives in the repo root. A new CI workflow regenerates it on every PR and fails the build if the diff is non-empty without an accompanying snapshot update. This catches accidental API changes at PR review time, not at release time. The 0.9.7 incident (a patch release that silently brokeas_slice) cannot happen again.Stability commitment
From this release forward:
2.0.0+) are reserved for genuine breaking changes. They will be telegraphed in advance through deprecation warnings and migration notes.1.1.0+) ship additive features. New methods, new types, new feature flags. Existing code keeps compiling.1.0.1+) ship bug fixes, perf improvements, internal refactors, and documentation polish. No public-surface changes.cargo-semver-checksruns on every PR against the latest published version. Thepublic-apiworkflow runs on every PR against the committed snapshot. Either check failing is a blocking gate, not advisory.The path from 0.9.x
mmap-iowas first published at0.1.0on 2025-08-05. The0.9.xseries ran from0.9.0through0.9.11over the course of the prior year, with the bulk of the load-bearing work in the final months:0.9.5: Three critical correctness bugs closed.flush_rangeaccumulator math,EveryMillisflush-policy lifetime, atomic-view UAF across resize.0.9.6: Unsafe audit. Everyunsafeblock re-justified with platform-spec citations; property-test suite added.0.9.7: Performance milestone. Zero-copy iterators (13.2x at 4 KiB, 475x at 64 KiB), zero-copyas_sliceon RW mappings,touch_pagestight-loop rewrite (~50-100x). This release also accidentally shipped breaking signature changes as a patch bump, a SemVer violation that carried for four releases.0.9.8: Ergonomic surface (audit E1-E7, F2, F5, F9).open_or_create,from_file,unmap, raw pointer access, prefetch, builder polish.0.9.9: Native file-change watchers viainotify/ FSEvents /ReadDirectoryChangesW.0.9.10: Pre-1.0 stabilization. Fuzz scaffold, ten focused examples,docs/PERFORMANCE.mdwith measured numbers,cargo-auditandcargo-semver-checksCI workflows, bench-regression hard gate.0.9.11: Field-issue response. Compat shims for the 0.9.7 violation (as_slice_bytes,for_each_mut_legacy), runtime-agnostic async (smol works),bytes::Bytesintegration,io::Read+io::Seekcursor,AsFd/AsRawFd/AsHandle/AsRawHandletrait impls.1.0.0is the result of that work. The code base is the same one that has been running through0.9.11; this release adds the four 1.0-bracket items (F1,F4,T6,F6), the doc-completeness pass, and the SemVer enforcement infrastructure.What 1.0.0 does NOT include
A handful of items from the audit are explicitly deferred to post-1.0:
sync_file_range(Linux). A niche fast path for some DB workloads. No external request to date.MmapInventory::all_open()diagnostic. Probably belongs in a separate diagnostics crate.These are tracked in
.dev/ROADMAP.mdunder "post-1.0 long-term work" and will ship as additive1.xminor bumps when there is a real consumer.Tests
--all-features(up from 140 in 0.9.11), 1 ignored (the unrelated hugepages-fallback test), 0 failed.tests/v1_0_0_additions.rscover theAnonymousMmapsurface andis_hugepage_backed.tests/ipc_cross_process.rscovers cross-process byte visibility.cargo build(default / no-default / all-features),cargo +1.75 build --all-features(MSRV),cargo fmt --check,cargo clippy --all-targets --all-features -D warnings,cargo doc --no-deps --all-features,cargo audit --deny warnings,cargo semver-checks check-release, andcargo public-apisnapshot diff all clean.Internals
src/anonymous.rsexportingAnonymousMmap.is_hugepage_backedand the smaps parser live insrc/mmap.rsbehind#[cfg(target_os = "linux")](returnsNoneon other platforms).MappedSliceMutgains apub(crate) fn guardedconstructor so the anonymous module can build write-guarded slices without duplicating the field-access boilerplate.Arcimport inbenches/mmap_bench.rsgated behind#[cfg(feature = "atomic")]to match its sole call site..github/workflows/public-api.ymlruns the diff check.Notes
tempfileremains dev-only.0.9.7-introduced API surface (MappedSlice, the zero-copy iterators, the flattenedfor_each_mut) is the recommended path for new code; the compat shims from 0.9.11 (as_slice_bytes,for_each_mut_legacy,chunks_owned) are preserved in 1.0.0 and will not be deprecated.Full Changelog: v0.9.11...v1.0.0
This discussion was created from the release v1.0.0 - Stable.
Beta Was this translation helpful? Give feedback.
All reactions