Manuscript Documentation
v2026.12.0

@std/data/uuid.ms#

Import each required symbol with import Name from "@std/data/uuid.ms".

namespace_dns Constant#

The namespace for fully qualified domain names, for uuid_v5.

Manuscript
namespace_dns String

namespace_oid Constant#

The namespace for ISO object identifiers, for uuid_v5.

Manuscript
namespace_oid String

namespace_url Constant#

The namespace for URLs, for uuid_v5.

Manuscript
namespace_url String

namespace_x500 Constant#

The namespace for X.500 distinguished names, for uuid_v5.

Manuscript
namespace_x500 String

uuid_v4 Function#

Creates a random version-4 UUID in lowercase text from the operating system’s entropy. Entropy failures return an Error.

Manuscript
fn uuid_v4() Result[String, Error] { ... }

uuid_v5 Function#

Creates the version-5 (SHA-1, name-based) UUID of name within namespace. The same namespace and name always give the same lowercase UUID, so it makes a stable id for a URL, a path or a key. namespace is any UUID text, such as namespace_url or an application’s own UUID; malformed text returns an Error with kind EBADMSG. Example: uuid_v5(namespace_dns, "python.org") is "886313e1-3b8a-5372-9b90-0c9aee199e5d".

Manuscript
fn uuid_v5(namespace String, name String) Result[String, Error] { ... }

uuid_v7 Function#

Creates a version-7 UUID: the current Unix time in milliseconds, a 12-bit sequence, then random bits, in lowercase text. Ids made later sort after ids made earlier as strings, which keeps database indexes and logs in creation order. Ids made in the same millisecond, even by different tasks, are ordered by the sequence, which counts up from a random start; if the sequence fills up or the clock steps back, the timestamp field keeps counting forward instead. Entropy failures return an Error.

Manuscript
fn uuid_v7() Result[String, Error] { ... }

uuid_version Function#

Returns the version digit (1 through 8) of a UUID text, or null when text is not an RFC 9562 UUID (including malformed text). Case does not matter. Example: uuid_version("886313e1-3b8a-5372-9b90-0c9aee199e5d") is 5.

Manuscript
fn uuid_version(text String) Int? { ... }