#unique-id #async #growing #yeast

yeast-rs

Tiny but linear growing unique id generator

1 unstable release

0.3.0 Jul 20, 2021

#882 in Asynchronous

Download history 53/week @ 2023-11-20 93/week @ 2023-11-27 41/week @ 2023-12-04 43/week @ 2023-12-11 54/week @ 2023-12-18 88/week @ 2023-12-25 76/week @ 2024-01-01 118/week @ 2024-01-08 90/week @ 2024-01-15 40/week @ 2024-01-22 44/week @ 2024-01-29 42/week @ 2024-02-05 70/week @ 2024-02-12 121/week @ 2024-02-19 142/week @ 2024-02-26 238/week @ 2024-03-04

582 downloads per month

MIT license

27KB
553 lines

yeast-rs

Tiny but linear growing unique id generator.
Rust implementation of the JS package - yeast

Usage

Install

[dependencies]
yeast-rs = "0.1.0"

Simple

This crate has one function yeast which return Yeast a URL-safe unique id.

use yeast_rs::yeast;

fn main() {
   let id = yeast().to_string(); //=> "NgqS4Rd"
}

async support

Currently, we support tokio and async-std

[dependencies]
yeast-rs = {version ="0.1.0",features=["async-std-runtime"]}
use yeast_rs::async_std::yeast;
async fn func(){
   let id = yeast().await.to_string(); //=> "NgqS4Rd"
}

Dependencies

~1–14MB
~143K SLoC