Skip to content

jacek-prisma/cuid-rust

This branch is up to date with mplanchard/cuid-rust:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a5a138e · Jan 13, 2025
Jan 13, 2025
Feb 22, 2020
Jan 13, 2025
Aug 19, 2024
Jan 22, 2023
Jan 11, 2022
Jan 13, 2025
Jan 9, 2025
Feb 5, 2019
Jan 11, 2022
Jan 13, 2025
Aug 19, 2024
Jan 8, 2025
Aug 15, 2024
Jan 11, 2022

Repository files navigation

cuid-rust

Build Status Crates.io docs.rs

This repository is the home of the cuid, cuid1, and cuid2 crates. The original CUID standard is marked as deprecated in favor of CUID2, but we intent to continue supporting v1 CUIDs indefinitely, since their k-sortability is only insecure in specific use-cases, while their sortability is quite useful in other use-cases.

The cuid crate provides a wrapper around both versions:

In addition, both cuid1 and cuid2 may be used as standalone crates:

Please see the individual crates' READMEs for more information.

If you are upgrading to cuid 2.0, you must swap usages of non-version-specific calls like cuid() for the desired version, i.e. cuid1() or cuid2().

Development

A flake.nix file is provided for easy installation of dependencies via the nix package manager. To start a shell with all of the dependencies available, run:

nix develop

Or, if you are not yet using flakes, a shell.nix shim is provided, so you can do the same with

nix-shell

If you use direnv, the .envrc file will automatically source the nix packages into your shell (or editor environment, if you use a direnv plugin).

About

Rust implemention of CUID unique IDs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 92.7%
  • Nix 3.8%
  • Makefile 2.4%
  • Shell 1.1%