Skip to content

Tags: scru128/rust

Tags

v4.2.0

Toggle v4.2.0's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v4.2.0 Released

- Updated `fstr` to v0.2.20 and followed its new constructor names.
- Refactored the global generator using `reseeding_rng::StdReseedingRng`.
- Updated dependencies.

v4.1.0

Toggle v4.1.0's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v4.1.0 Released

- Separated the reseeding functionality of the global generator as an
  independent `reseeding_rng` crate.
- Minor refactoring.

v4.0.0

Toggle v4.0.0's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v4.0.0 Released

Breaking changes:

This version streamlines the API by removing many features and methods that were
deprecated in v3.x.

- Feature removals:
  - Removed the `default_rng` feature and related APIs, including the
    `DefaultRng` type and the `Generator::new()` constructor. To use `Generator`,
    enable the `rand010` feature and provide a random number generator from the
    `rand` crate.
  - Removed the `rand08` feature and related APIs, including the `rand` feature
    alias and the blanket `RandSource` implementation for `rand::RngCore` v0.8.
  - Hid the `rand09` feature from documentation. This may be removed in a future
    minor update.
- `Generator` cleanups:
  - Removed the default concrete type of `DefaultRng` from the generic type `R`.
  - Removed `new()` and `with_rng()` constructors.
  - Removed the direct `Iterator` implementation; use the `iter()` method to get
    an infinite iterator instead.
  - Removed `generate_or_reset_core()` and `generate_or_abort_core()` methods.
  - Removed `Eq` and `PartialEq` implementations from `Generator`,
    `StdSystemTime`, and `with_rand*::Adapter`s.
- Deprecated alias removals:
  - Removed the `gen` module alias to `generator`.
  - Removed the top-level re-export of `ParseError`; use `id::ParseError`.
  - Removed the `Scru128Generator` alias; use `Generator` instead.
  - Removed the `Scru128Id` alias; use `Id` instead.
  - Removed the `Scru128Rng` trait alias; use `RandSource` instead.
- Other breaking changes:
  - Removed `Id::from_fields()` in favor of the safer `try_from_fields()`.
  - Removed `Clone`, `Eq`, and `PartialEq` implementations from `ParseError`.

Maintenance:

- Upgraded the `rand` crate used by `global_gen` from v0.9 to v0.10.

v3.6.1

Toggle v3.6.1's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v3.6.1 Released

- Separated the fork detection functionality of the global generator as an
  independent `forkguard` crate.

v4.0.0-beta.2

Toggle v4.0.0-beta.2's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v4.0.0-beta.2 Released

Breaking changes:

This version streamlines the API by removing many features and methods that were
deprecated in v3.x.

- Feature removals:
  - Removed the `default_rng` feature and related APIs, including the
    `DefaultRng` type and the `Generator::new()` constructor. To use `Generator`,
    enable the `rand010` feature and provide a random number generator from the
    `rand` crate.
  - Removed the `rand08` feature and related APIs, including the `rand` feature
    alias and the blanket `RandSource` implementation for `rand::RngCore` v0.8.
  - Hid the `rand09` feature from documentation. This may be removed in a future
    minor update.
- `Generator` cleanups:
  - Removed the default concrete type of `DefaultRng` from the generic type `R`.
  - Removed `new()` and `with_rng()` constructors.
  - Removed the direct `Iterator` implementation; use the `iter()` method to get
    an infinite iterator instead.
  - Removed `generate_or_reset_core()` and `generate_or_abort_core()` methods.
  - Removed `Eq` and `PartialEq` implementations from `Generator`,
    `StdSystemTime`, and `with_rand*::Adapter`s.
- Deprecated alias removals:
  - Removed the `gen` module alias to `generator`.
  - Removed the top-level re-export of `ParseError`; use `id::ParseError`.
  - Removed the `Scru128Generator` alias; use `Generator` instead.
  - Removed the `Scru128Id` alias; use `Id` instead.
  - Removed the `Scru128Rng` trait alias; use `RandSource` instead.
- Other breaking changes:
  - Removed `Id::from_fields()` in favor of the safer `try_from_fields()`.
  - Removed `Clone`, `Eq`, and `PartialEq` implementations from `ParseError`.

Maintenance:

- Upgraded the `rand` crate used by `global_gen` from v0.9 to v0.10.

v3.6.0

Toggle v3.6.0's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v3.6.0 Released

- Renamed `Scru128Generator` and `Scru128Id` to `Generator` and `Id`,
  respectively, so they can be used as `scru128::Generator` and `scru128::Id`.
  Old names are left as deprecated aliases for backward compatibility.
- Deprecated `default_rng` cargo feature and related APIs, most notably, the
  `new()` constructor and default type parameter `R` of `Scru128Generator`.
- Deprecated `rand09` cargo feature and the integration with `rand` crate v0.9.
- Deprecated `Scru128Id::from_fields()` constructor in favor of
  `try_from_fields()`.
- Added `Scru128Generator::iter()` to supersede the direct `Iterator`
  implementation for `Scru128Generator`.
- Tweaked the `Debug` representation of `Scru128Generator`.
- Hid deprecated `Scru128Rng` trait alias from documentation.
- Upgraded the dev dependency on `rand` from v0.9 to v0.10.
- Minor refactoring.

v3.5.0

Toggle v3.5.0's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v3.5.0 Released

Added:

- `Scru128Id::try_from_fields()` constructor that validates input ranges and
  returns a `Result<Scru128Id, FieldError>`, offering a safer alternative to the
  panicking `from_fields()`.
- `id` module that provides access to `ParseError` and the newly added
  `FieldError`.

Deprecated:

- The top-level re-export of `ParseError` in favor of `scru128::id::ParseError`.

Maintenance:

- Minor refactoring and documentation updates.

v3.4.0

Toggle v3.4.0's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v3.4.0 Released

- Migrated to Edition 2024 and upgraded MSRV from 1.70 to 1.85.
- Implemented `core::error::Error` for `ParseError` in `no_std` environments.

v3.3.1

Toggle v3.3.1's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v3.3.1 Released

New features and improvements:

- Customizable time sources: Introduced a generic `TimeSource` trait for
  `Scru128Generator`, allowing users to provide custom timestamp sources. This
  enhances flexibility, especially for testing or specific environments. The
  default implementation `StdSystemTime` uses `std::time::SystemTime`.
  - A new constructor, `with_rand_and_time_sources()`, is added to specify both
    random number and timestamp sources.
  - The `generate()` and `generate_or_abort()` methods that were gated behind
    `std` are now available in `no_std` where a custom `TimeSource` is provided.
- Generator-level rollback allowance: Added `set_rollback_allowance()` to
  `Scru128Generator` to configure the maximum allowed timestamp rollback for
  each generator instance. This dictates `generate()` and `generate_or_abort()`
  as well as eliminates the need for the `rollback_allowance` argument of the
  `*_core` variants, which are now superseded by the newly added `*_with_ts`
  variants that leverage the generator-level setting.
- `rand` v0.10 support: Added a new `rand010` feature to support the `rand`
  crate (v0.10).

API changes and deprecations:

- `RandSource` trait: Renamed `Scru128Rng` trait to `RandSource` for improved
  clarity and consistency. A deprecated type alias `Scru128Rng` is provided for
  backward compatibility.
- Deprecated constructor: Deprecated `Scru128Generator::with_rng()` in favor of
  the more explicit `Scru128Generator::with_rand_and_time_sources()`.
- Deprecated core generator methods: Deprecated `generate_or_reset_core()` and
  `generate_or_abort_core()` of `Scru128Generator`. Users should migrate to the
  new `generate_or_reset_with_ts()` and `generate_or_abort_with_ts()` methods.
- Deprecated `rand` v0.8 support: Deprecated `rand08` cargo feature and related
  APIs to encourage migration to newer `rand` versions.

Maintenance and other changes:

- Changed impl `Debug` for `Scru128Generator` to conceal internal state.
- Test code refactoring.
- Minor documentation updates.

v3.2.3

Toggle v3.2.3's commit message

Verified

This tag was signed with the committer’s verified signature.
LiosK LiosK
v3.2.3 Released

Maintenance:

- Minor refactoring and performance improvement.