atomic-snowflake 11.1.0

Zero-dependency lock-free monotonic 64-bit Snowflake ID, 128-bit ULID, and RFC 9562 UUIDv7 generators with stack-buffered Crockford Base32 and hyphenated hex codecs.
Documentation
<div align="center">

# atomic-snowflake

**Zero-Dependency Lock-Free Snowflake ID, ULID & RFC 9562 UUIDv7 Generators**

[![crates.io](https://flat.badgen.net/crates/v/atomic-snowflake)](https://crates.io/crates/atomic-snowflake)
[![docs.rs](https://img.shields.io/docsrs/atomic-snowflake?style=flat-square)](https://docs.rs/atomic-snowflake)
[![Rust 2024](https://img.shields.io/badge/edition-2024-orange.svg?style=flat-square)](https://www.rust-lang.org)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](../LICENSE)

[Workspace Overview](../README.md) · [API Docs](https://docs.rs/atomic-snowflake/latest/) · [Agent Engineering Rules](../AGENTS.md)

</div>

---

## Overview

Provides zero-dependency, lock-free monotonic 64-bit Snowflake ID (`SnowflakeGenerator` / `SnowflakeId`), 128-bit Crockford Base32 ULID (`UlidGenerator` / `Ulid`), and RFC 9562 UUIDv7 (`UuidV7Generator` / `UuidV7`) generators with clock-rollback protection and zero-allocation stack codecs.

This package is part of the [`ctares`](../README.md) unified Rust 2024 workspace and follows the repository's strict module purity, formatting, and dependency-ordered release standards.

## Installation & Quick Start

```sh
cargo add atomic-snowflake
```

```rust
use atomic_snowflake::*;

let sf: SnowflakeGenerator = SnowflakeGenerator::new(1).expect("valid node id");
let id: SnowflakeId = sf.next_id();
assert_eq!(id.node_id(), 1);

let ulid_gen: UlidGenerator = UlidGenerator::new();
let ulid: Ulid = ulid_gen.next_ulid();
assert_eq!(Ulid::parse(&ulid.to_string()).expect("valid ulid"), ulid);

let uuid_gen: UuidV7Generator = UuidV7Generator::new();
let uuid: UuidV7 = uuid_gen.next_uuid();
assert_eq!(uuid.version(), 7);
```

## License

This project is licensed under the MIT License. See the [LICENSE](../LICENSE) file for details.