Open ai opened 6 years ago
How do you see async
in Rust? We have event-loop, and any operation is performed synchronously
It is questionable part depends on a programming language. Maybe it should not be implemented in Rust.
But what about event-loop based framework which we talk about in Logux issue?
It seems to me that to bring a big Tokio for small nanoid is inadmissible. It seems to me that in the reality of Rust, it is better for the user to decide how he organizes the asynchrony
it is better for the user to decide how he organizes the asynchrony
👍
I like your plan to let users decide asynchrony. That makes sense to me too.
The non-secure generator would be a nice feature, so I'll keep an eye out for that. Maybe changing this issue to just track that would fit since it's the only remaining task.
Thank you
I like that the Uuid crate has a Uuid type that just stores the random bytes. If you're planning to change the API, something like this would be nice to have. It improves performance when using the NanoID as the key in object stores that don't use String keys.
Maybe also change the API of the random generator to be FnMut(&mut [u8])
so that a new vec doesn't have to be allocated each time more random data is needed.
Let’s update the library to be compatible with the latest Nano ID 2.0:
~
to-
in default alphabetnon-secure
fast generator