README.md

July 24, 2026 · View on GitHub

██╗   ██╗██╗   ██╗██╗██████╗
██║   ██║██║   ██║██║██╔══██╗
██║   ██║██║   ██║██║██║  ██║
██║   ██║██║   ██║██║██║  ██║
╚██████╔╝╚██████╔╝██║██████╔╝
 ╚═════╝  ╚═════╝ ╚═╝╚═════╝

License: MIT zmax plugin

[RANDOM UUIDv4 AT THE CURSOR — COMPILED]

"uuid — one word, and a fresh v4 is in the buffer."

[NATIVE ZMAX PLUGIN]

:uuid inserts a random RFC 4122 version-4 UUID at the cursor — as a native zmax plugin: a compiled Rust cdylib loaded at runtime over zmax's stable C ABI, no editor recompile. Entropy is read from /dev/urandom, so the crate has zero dependencies.

zmax · zmax-native · docs


Table of Contents


[0x00] OVERVIEW

:uuid          → 3f2504e0-4f89-41d3-9a0c-0305e82c3301
:uuid-upper    → 3F2504E0-4F89-41D3-9A0C-0305E82C3301

[0x01] INSTALL

:zmax-native add MenkeTechnologies/zmax-native-uuid

zmax-native, zmax's package manager, clones the repo, runs cargo build --release, installs the cdylib into the content-addressed store under ~/.zmax/pkg/ (SHA-256 pinned), and dlopens it — by mmap, so the loader pages the library in. To self-install on first launch and load zero-network after, add one line to ~/.zmax/init.vim (the leading : is required):

:zmax-native get MenkeTechnologies/zmax-native-uuid

Manual build

cargo build --release

Then, in zmax:

:zmax-native load ./target/release/libzmax_native_uuid.dylib   # .so on Linux

[0x02] USAGE

:uuid inserts a lowercase UUIDv4 at the primary cursor; :uuid-upper inserts an uppercase one. The insertion is a single undo step.


[0x03] HOW IT WORKS

The plugin registers two typable commands through the zmax-native SDK. Each reads 16 bytes from /dev/urandom, sets the version nibble to 4 and the variant bits to 10, formats the canonical 8-4-4-4-12 hex string, and inserts it with the host insert_text callback (undoable as one transaction). No dependencies.


[0xFF] LICENSE

MIT. Built against the zmax-native plugin SDK. See LICENSE.