1 unstable release

0.3.0 Jul 20, 2021

#1 in #growing

Download history 115/week @ 2024-04-07 65/week @ 2024-04-14 122/week @ 2024-04-21 45/week @ 2024-04-28 26/week @ 2024-05-05 31/week @ 2024-05-12 60/week @ 2024-05-19 73/week @ 2024-05-26 73/week @ 2024-06-02 43/week @ 2024-06-09 46/week @ 2024-06-16 66/week @ 2024-06-23 48/week @ 2024-06-30 4/week @ 2024-07-07 109/week @ 2024-07-14 23/week @ 2024-07-21

189 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–12MB
~123K SLoC