#unique-id #snowflake-id #id #snowflake #unique

snowferris

various unique ID formats for Rust

4 releases (stable)

1.0.2 Feb 13, 2022
1.0.1 Aug 13, 2021
1.0.0 Aug 12, 2021
0.2.1 Aug 2, 2021
0.1.0 Aug 2, 2021

#7 in #snowflake-id

41 downloads per month

Custom license

11KB
197 lines

snowferris

builds.sr.ht status

Snowferris is a open-sourced, ISC-licensed library implementing various (distributed) unique ID formats.

Usage

Add this package to the dependency section in Cargo.toml. Make sure to enable features that you're gonna use it in your projects.

Currently, we support

snowflake
nanoid

and plan to support

sno
sandflake
ksuid
xid

Macros

[x] nanoid

[ ] Snowflake - This would potentially cause a conflict between generated snowflake IDs AFAIK.

Contributing

refer to this

Shoutouts

Some bits of the Snowflake module was inspired from iCrawl/rustflake (github). nanoid implementation is based on nikolay-govorov/nanoid.

Dependencies

~1.7–8MB
~36K SLoC