MyNixOS website logo
Description

Modern UUIDs for R with a Rust Backend.

Generate, parse, and validate RFC 9562 UUIDs from R using the Rust 'uuid' crate via 'extendr'. Developed by Thomas Bryce Kelly at Icy Seas Co-Laboratory LLC. Version 7 UUIDs are the default for new identifiers, while versions 4, 5, 6, and legacy version 1 are also supported. Functions return character vectors by default and can also expose 16-byte raw representations for low-level workflows.

uuidx

uuidx is an R package for generating and working with modern UUIDs using a Rust backend. It focuses on a small, practical API and uses the Rust uuid crate through rextendr and extendr.

The package is developed by Thomas Bryce Kelly and published as part of Icy Seas Co-Laboratory, an applied research and engineering institute focused on practical computational tools, data systems, and scientific software and based in Fairbanks, AK.

About Icy Seas Co-Laboratory

Icy Seas Co-Laboratory is the home organization behind uuidx. If you are using this package in research, engineering, or production workflows and want more context on the broader work around it, the project site is the best place to start.

Why Rust?

  • The Rust uuid crate gives us current RFC 9562 behavior without relying on a system package such as libuuid.
  • Parsing, validation, version detection, and byte conversion stay in one well-tested backend.
  • The R layer can stay compact while the low-level work happens in a fast, memory-safe implementation.

Why version 7 by default?

Version 7 UUIDs combine time-ordering with strong uniqueness properties and are generally a practical default for new application identifiers. They sort more naturally than version 4 identifiers. Users should familiarize themselves with the structure and trade-offs associated with each version (e.g., Wikipedia).

Development setup

End users installing CRAN binaries on macOS or Windows typically do not need a local Rust toolchain. Rust is mainly needed for source installs and package development.

Install Rust first if it is not already available:

  • https://www.rust-lang.org/tools/install

Then install the R-side development dependencies:

install.packages(c("rextendr", "testthat"), repos = "https://cloud.r-project.org")

From the package root:

Rscript -e 'rextendr::document()'
Rscript -e 'testthat::test_local()'
R CMD build .
R CMD check --as-cran uuidx_*.tar.gz

For quick local iteration:

rextendr::document()
testthat::test_local()

You can also use the included Makefile:

make deps
make document
make test
make build
make check

Examples

Generate version 7 UUIDs

uuid_v7()
uuid_v7(3)
uuid_generate()

Generate version 4 UUIDs

uuid_v4()
uuid_generate(5, version = "v4")

Generate deterministic version 5 UUIDs

uuid_v5("dns", "example.com")
uuid_v5("dns", c("alpha", "beta"))
uuid_generate(version = "v5", namespace = "dns", name = "example.com")

Validate UUIDs

x = c(uuid_v7(), "not-a-uuid")
uuid_validate(x)
uuid_version(x)

Parse to raw bytes

x = uuid_v7(2)
uuid_parse(x, output = "raw")
uuid_parse(x, output = "fields")
uuid_nil(output = "raw")

Notes

  • Version 7 is the default generator.
  • Versions 4, 5, 6, and legacy version 1 are also supported.
  • Functions return character vectors by default.
  • Raw output is available where byte-level access is useful.
Metadata

Version

0.0.1

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows