1 unstable release

0.3.0 Jul 20, 2021

#1277 in Asynchronous

Download history 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 197/week @ 2024-03-11 162/week @ 2024-03-18 128/week @ 2024-03-25 80/week @ 2024-04-01

586 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–13MB
~133K SLoC