uuid

Generate and parse UUIDs in Rust across every standardized version, from v1 to v8.

Library
Cargo
v1.24.1
1,233stars
Apache-2.0 OR MIT

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
83/100Excellent
Development Activity88
Maintenance80
Community76
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
90/100Excellent
Architecture88
Code Quality90
Innovation92
Learning Curve90

uuid is the de facto standard Rust crate for generating and parsing Universally Unique Identifiers as defined by RFC 9562. It ships with zero dependencies by default and works in no_std environments, adding generation support for versions 1, 3, 4, 5, 6, 7, and 8 through opt-in Cargo features so consumers only pay for the algorithms they actually use.

Beyond generation, the crate provides fast parsing and formatting (hyphenated, simple, URN, and braced representations), a const uuid! macro for compile-time literals, and optional integrations with serde, zerocopy, bytemuck, borsh, and arbitrary for teams that need UUIDs to interoperate cleanly with serialization, FFI, or fuzzing pipelines.

What You Get

  • A Uuid type with parsing, formatting (hyphenated/simple/URN/braced), and comparison built on top of the standard library alone
  • Feature-gated generators for UUID versions 1, 3, 4, 5, 6, 7, and 8, so binaries only link the randomness/hashing code they request
  • A uuid! const macro for embedding known UUID literals directly into compiled code with compile-time validation
  • A lower-level Builder API for constructing UUIDs of any version without pulling in generation-specific dependencies
  • Optional trait implementations for serde, zerocopy, bytemuck, borsh, and arbitrary behind individual Cargo features
  • no_std compatibility for embedded and constrained targets, including WebAssembly support via wasm-bindgen

Common Use Cases

  • Generating unique primary keys or request/trace IDs for services and databases (v4 for randomness, v7 for time-sortable keys)
  • Deterministically deriving stable identifiers from names or namespaces using v3 (MD5) or v5 (SHA-1)
  • Parsing and validating UUID strings received from external APIs or user input, with typed error handling instead of panics
  • Embedding fixed, known UUIDs as compile-time constants (e.g. protocol or schema identifiers) via the uuid! macro
  • Serializing UUIDs through serde in JSON/binary formats, or interoperating with zerocopy/bytemuck for low-level buffer work

Under The Hood

Architecture — The crate centers on a single Uuid newtype wrapping a 128-bit value ([u8; 16]), with builder.rs providing a version-agnostic Builder that every version-specific module (v1.rs through v8.rs) delegates to for actually constructing bytes. fmt.rs implements Display/Debug and the hyphenated/simple/URN/braced string representations, while parser.rs implements the inverse (FromStr and byte-level parsing) with a dedicated error.rs for typed parse failures instead of panics. timestamp.rs is a substantial module (1300+ lines) handling the time-based UUID versions (v1, v6, v7), and non_nil.rs provides a NonNilUuid newtype for the common case where an all-zero UUID is an invalid state. Optional trait implementations (serde, zerocopy, bytemuck, borsh, arbitrary) live behind an external/ module and are only compiled when their respective Cargo features are enabled, keeping the default build free of third-party dependencies.

Tech Stack — Rust 2021 edition targeting MSRV 1.85.0, structured as a Cargo workspace with the main uuid crate plus internal sub-crates (rng for randomness sourcing, examples, and dedicated wasm32-getrandom-test/smoke-test crates for target-specific verification). The default feature set is std only — no external dependencies are pulled in unless a consumer opts into v1/v3/v4/v5/v6/v7 (generation), serde, zerocopy, bytemuck, borsh, or arbitrary. WebAssembly targets get their own conditional dependency tree using wasm-bindgen and js-sys instead of getrandom/rand directly.

Code Quality — The crate carries 94 inline #[test] functions spread across its source modules, plus a separate tests/ directory that includes trybuild-based UI tests (tests/ui/compile_pass and compile_fail) gated by Rust channel via rustversion — a notably rigorous way to assert the public API’s compile-time contract (e.g. which trait impls should or shouldn’t be available under which features). Parsing failures are represented as a typed Error enum rather than panics or unwraps, and the extensive doc comments throughout lib.rs are themselves runnable doctests that CI verifies stay accurate.

API Design — The common path is a single import (use uuid::Uuid) and a one-line call (Uuid::new_v4()), with the uuid! const macro letting known UUIDs be embedded as compile-time literals with zero runtime cost. Cargo features map cleanly onto UUID versions and integrations by name, so the dependency footprint scales precisely with what a consumer opts into, and the Builder type gives lower-level control (e.g. custom randomness sources) without requiring the higher-level generation features at all.

Used by 49 apps in this directory

Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

75,729

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
66
Dependency
Built with
Dart74%
Rust24%
Updated 1 weeks ago
Rust
54%
Other

Cameleer

AI Agents

23

A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.

View details
48
Repo Health
65
Technical
76
Dependency
Built with
Rust54%
JavaScript24%
TypeScript15%
Updated 4 weeks ago
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
Swift
64%
GPL 3.0

cmux

Developer Tools · AI Development

26,221

A native, Ghostty-based macOS terminal with vertical tabs, agent-aware notifications, and a scriptable browser built for running many parallel AI coding agent sessions instead of juggling tmux panes.

View details
84
Repo Health
81
Technical
72
Dependency
Built with
Swift64%
Rust14%
Updated today
Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,247

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust31%
C21%
Updated today
Java
34%
Apache 2.0

Enso

Analytics · Data Engineering · Low Code Platforms

7,437

A visual and textual programming platform for data prep and analysis where the node graph and the underlying Enso code are always perfectly in sync, built by an Alteryx co-founder on a GraalVM engine.

View details
70
Repo Health
90
Technical
62
Dependency
Built with
Java34%
TypeScript27%
Scala26%
Updated 1 weeks ago
TypeScript
75%
Apache 2.0

Fern

Developer Tools

3,761

Fern turns a single OpenAPI, AsyncAPI, or Protobuf definition into type-safe SDKs for nine languages and a hosted API documentation site, all from one CLI and one source of truth.

View details
90
Repo Health
86
Technical
67
Dependency
Built with
TypeScript75%
Updated today
Rust
100%
Other

Fluree DB

Databases

445

A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.

View details
86
Repo Health
74
Technical
65
Dependency
Built with
Rust100%
Updated yesterday
Rust
95%
MIT

Fyrox

Game Development

9,512

A production-ready 2D/3D game engine written in Rust with a built-in scene editor, physics, and hot-reloading game scripts

View details
85
Repo Health
79
Technical
68
Dependency
Built with
Rust95%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search