10 releases
| 0.3.4 | May 20, 2025 |
|---|---|
| 0.3.3 |
|
| 0.3.1 | Aug 6, 2024 |
| 0.2.0 | Nov 5, 2023 |
| 0.0.3 | Sep 16, 2023 |
#661 in Encoding
112 downloads per month
Used in 4 crates
29KB
725 lines
tsid
TSID generator for rust, this library is reimplementation of java tsid-creator created by Fabio Lima
Implementation status:
- Generate TSID with simple, naive implementation
- Add basic tests to check compatibility
- Benchmarks (compare the speed to java library)
- Publish first usable version to crates.io
- GitHub actions workflow to CI
- Serde serialization
- Thread safety
How to use it?
use tsid::create_tsid;
fn main() {
let tsid = create_tsid();
}
Crate features:
bson_as_string- the same as for serdebson- adds From bson conversionchrono- Allow extracting DateTime from TDISdebug- adds debug trait to TSIDdisplay- add Display trait to TSIDserde_as_string- tells serde to serialize TSID as string (disabling this feature means that serde will serialize to string for human readable formats ant tu u64 otherwise)serde- adds serde dependency and serialization/deserialization
Dependencies
~1.5–3.5MB
~65K SLoC