Skip to content

v1.0.1 — Patch (mod-rand 1.0)

Latest

Choose a tag to compare

@jamesgober jamesgober released this 18 May 15:23

mod-tempdir v1.0.1 — mod-rand 1.0 Refresh

Date: 2026-05-18
Compare: v1.0.0...v1.0.1

Headline

Pure dependency-refresh release. The optional mod-rand dep is
bumped from 0.9.5 to 1.0 so that downstream consumers enabling
the mod-rand feature pick up mod-rand's SemVer-locked stable
surface. No mod-tempdir public API changes; no behavioural
changes.

mod-tempdir 1.0.0 shipped against mod-rand 0.9.5 because that
was the latest at the time of the v1.0 cut. Cargo's caret matching
treats 0.9.x → 1.0 as a major hop and will not auto-upgrade
across it, so this is the manifest bump that lets new builds of
mod-tempdir track the locked-API release of mod-rand.

What changed

Optional mod-rand dep bumped to 1.0

-mod-rand = { version = "0.9.5", optional = true, default-features = false, features = ["tier2"] }
+mod-rand = { version = "1.0",   optional = true, default-features = false, features = ["tier2"] }

mod-rand 1.0.0 is documented as a strict superset of
0.9.5:

  • The single mod-rand symbol this crate calls
    (mod_rand::tier2::unique_name) is in mod-rand's API freeze
    audit under "carried forward, unchanged."
  • Naming output (uniformly-distributed Crockford base32 from the
    PID + nanos + atomic-counter + Stafford-mix-13 pipeline) is
    byte-identical to what 0.9.5 produced for the same call
    sequence.
  • The tier2 feature flag on mod-rand continues to exist and
    continues to gate the same module.
  • mod-rand's 1.x SemVer policy
    (STABILITY.md)
    pins this surface for the entire 1.x line.

This bump means cargo install mod-tempdir --features mod-rand
on a fresh machine now downloads mod-rand 1.0 rather than the
older 0.9.5. Existing users staying on mod-tempdir 1.0.0 are
unaffected and can keep mod-rand 0.9.5 in their lockfile until
they choose to upgrade.

Version bump only — no other code or doc changes

  • Cargo.toml: version = "1.0.0"version = "1.0.1".
  • Cargo.toml: mod-rand = "0.9.5"mod-rand = "1.0".
  • CHANGELOG.md: [1.0.1] entry added; compare links updated.

No edits to src/, tests/, docs/, README.md, REPS.md, or
any examples. The trust handshake established at 1.0.0 is
intact.

Frozen public surface (unchanged from 1.0.0)

Listed here for reference; identical to what 1.0.0 shipped:

pub struct TempDir { /* private */ }
impl TempDir {
    pub fn new() -> io::Result<Self>;
    pub fn with_prefix(prefix: &str) -> io::Result<Self>;
    pub fn path(&self) -> &Path;
    pub fn persist(self) -> PathBuf;
    pub fn cleanup_on_drop(&self) -> bool;
}
impl Drop for TempDir { /* recursive cleanup */ }

pub struct NamedTempFile { /* private */ }
impl NamedTempFile {
    pub fn new() -> io::Result<Self>;
    pub fn with_prefix(prefix: &str) -> io::Result<Self>;
    pub fn path(&self) -> &Path;
    pub fn persist(self) -> PathBuf;
    pub fn persist_atomic(self, target: impl AsRef<Path>) -> Result<PathBuf, PersistAtomicError>;
    pub fn cleanup_on_drop(&self) -> bool;
}
impl Drop for NamedTempFile { /* remove_file */ }

pub struct PersistAtomicError { pub error: io::Error, pub file: NamedTempFile }

pub fn cleanup_orphans(max_age_hours: u64) -> io::Result<usize>;

The mod-rand feature flag is part of the stable surface. Default
basename formats (.tmp-{pid}-{name12} for TempDir,
.tmpfile-{pid}-{name12} for NamedTempFile) are part of the
stable contract — cleanup_orphans parses them.

MSRV

1.75, unchanged. Verified by CI on every push. mod-rand 1.0
also pins to 1.75, so the dep bump does not move this floor.

Verification

Full matrix run on Windows host (x86_64-pc-windows-msvc):

  • cargo update -p mod-rand: pulls mod-rand 1.0.0 from crates.io.
  • cargo tree --features mod-rand: one node deep
    (mod-tempdir 1.0.1 → mod-rand 1.0.0). No transitive deps.
  • cargo build (default features): ✓
  • cargo build --features mod-rand: ✓
  • cargo build --all-features: ✓
  • cargo +1.75 build --all-features (MSRV): ✓
  • cargo fmt --all -- --check: ✓
  • cargo clippy --all-targets --all-features -- -D warnings: ✓
  • cargo clippy --all-targets --no-default-features -- -D warnings: ✓
  • cargo doc --all-features --no-deps: ✓
  • cargo test --no-default-features: all pass
  • cargo test --all-features: all pass

CI matrix: ubuntu-latest, macos-latest, windows-latest, plus the
MSRV-1.75 job.

Migration from 1.0.0

No source changes required. Upgrade by changing your dependency
spec:

mod-tempdir = "1.0.1"        # or "1.0", or "1"

If you depend on mod-tempdir with features = ["mod-rand"], the
upgrade transitively shifts your mod-rand resolution to 1.0.
That move is also non-breaking; see the mod-rand 1.0.0 release
note for the full freeze audit.

Stability commitment (carried forward from 1.0.0)

From 1.0.0 forward, unchanged:

  • Breaking API changes require 2.0.0. Renames, signature
    changes that aren't purely additive, removed methods, removed
    types, and changes to documented Drop / persist semantics all
    count as breaking.
  • Additive API changes (new methods on existing types, new
    free functions, new types) bump the minor version (1.1.0,
    1.2.0, …).
  • Bug fixes, doc improvements, internal-only changes bump
    the patch version (1.0.x). This release is one of those.
  • MSRV stays at Rust 1.75 within the 1.x line. Any MSRV
    bump ships in a minor release with a notice; major MSRV changes
    wait for 2.0.
  • The mod-rand feature flag is part of the stable surface. Its
    behaviour (uniformly distributed Crockford base32 names via
    mod_rand::tier2::unique_name) is part of the contract.
  • Default basename formats (.tmp-{pid}-{name12} for TempDir,
    .tmpfile-{pid}-{name12} for NamedTempFile) are part of the
    contract — they are what cleanup_orphans parses.

Explicitly out of scope for 1.0.1

  • No new features. None ship in this cut.
  • No API additions. Even purely-additive surface is deferred to
    1.1.0 so this release is unambiguously a dep-refresh signal.
  • No doc rewrites or example changes. The 1.0.0 documentation
    remains canonical.

Release ceremony

Standard pattern carried over:

  1. git tag -a v1.0.1 -m "Release v1.0.1 — mod-rand 1.0 refresh"
  2. git push origin main
  3. git push origin v1.0.1
  4. cargo publish --dry-run --all-features
  5. cargo publish
  6. Confirm https://crates.io/crates/mod-tempdir/1.0.1 is live.

GitHub release title: v1.0.1 — mod-rand 1.0 refresh. Not tagged
as pre-release.


Full Changelog: v1.0.0...v1.0.1