Cargo Features

[dependencies]
uuid = { version = "1.6.1", default-features = false, features = ["std", "macro-diagnostics", "v1", "v3", "v4", "v5", "v6", "v7", "v8", "js", "rng", "fast-rng", "sha1", "md5", "borsh", "bytemuck", "serde", "slog", "zerocopy", "arbitrary"] }
default = std

The std feature is set by default whenever uuid is added without default-features = false somewhere in the dependency tree.

std default
macro-diagnostics = uuid-macro-internal
v1 = atomic

NOTE: When adding new features, check the ci.yml workflow and include them where necessary (you can follow along with existing features)

Affects uuid::v1, timestamp::context.Context

v3 = md5
v4 = rng
v5 = sha1
v6 = atomic

Affects timestamp::context.Context

v7 = atomic, rng
v8
js = getrandom, wasm-bindgen

Enables js of getrandom

rng fast-rng? v4? v7? = getrandom
fast-rng = rand, rng
sha1 v5? = sha1_smol
md5 v3? = md-5

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

borsh implicit feature

Enables default (std) of borsh ^0.10.3

bytemuck implicit feature

With derive

serde implicit feature

Affects uuid::serde

slog implicit feature

With default (std)

zerocopy implicit feature

Enables zerocopy ^0.6

md-5 md5?
rand fast-rng?

With default features

sha1_smol sha1?
uuid-macro-internal macro-diagnostics?
wasm-bindgen js?

With default features

getrandom js? rng?
atomic v1? v6? v7?

Enables atomic ^0.5

arbitrary implicit feature