Expand description
Zero-dependency UUID implementation for nexcore ecosystem
Provides NexId — a 128-bit universally unique identifier compatible with
UUID v4 (random) and v7 (timestamp + random) specifications.
§Supply Chain Sovereignty
This crate has zero external dependencies. It replaces the uuid crate
for the nexcore ecosystem, eliminating supply chain risk for identifier generation.
§Security
Platform-dependent entropy quality:
| Platform | Entropy Source | CSPRNG |
|---|---|---|
| Unix (Linux, macOS, BSD) | /dev/urandom | Yes |
| Windows (Vista+) | BCryptGenRandom | Yes |
| WASM | Timestamp + xorshift | No |
| Other | Timestamp + xorshift | No |
WARNING: On WASM and unsupported platforms, UUIDs are generated using a timestamp-seeded xorshift64 PRNG that is NOT cryptographically secure. Do not use for:
- Cryptographic keys or secrets
- Password reset tokens
- Security-sensitive session identifiers
See SECURITY.md for full threat model and usage guidelines.
§Examples
use nexcore_id::NexId;
// Generate random v4 UUID
let id = NexId::v4();
println!("{id}"); // e.g., "550e8400-e29b-41d4-a716-446655440000"
// Generate timestamp-based v7 UUID
let id = NexId::v7();
// Parse from string
let id: NexId = "550e8400-e29b-41d4-a716-446655440000".parse().unwrap();Structs§
- NexId
- A 128-bit universally unique identifier.
Enums§
- Parse
Error - Error returned when parsing a UUID string fails.