From f13e04ff859190bd5c5c771bdb2ea9a536dad689 Mon Sep 17 00:00:00 2001 From: cbax Date: Sun, 29 Sep 2024 01:53:44 -0400 Subject: [PATCH] added desc and updated README --- Cargo.toml | 2 ++ README.md | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a023eaf..d9f29e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,9 @@ name = "icechip" version = "0.1.0" edition = "2021" +description = "A mostly true to spec Twitter Snowflake implementation, with multiple modes." repository = "https://git.cbax.dev/icechip" +readme = "README.md" license = "MIT" publish = true diff --git a/README.md b/README.md index 3ac8ae9..33526a8 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,14 @@ A snowflake library that actually does what it is supposed to. -Adheres to the twitter specification, but also has an improved mode. +(Mostly) adheres to the twitter specification, but also has an improved mode. + +NOTE: Only enhanced and extended modes are available at this time. Twitter original spec is horridly painful to implement with generics, as it supports both u64 and i64 and ignores the sign bit completely in both modes. (essentially u63 and i64 modes). ## Twitter Specification | u64 or i64 | | | | |:-:|:-:|:-:|:-:| -| bits 0-40 | bits 41-51 | bits 52-62 | 63 | +| 0-40 | 41-51 | 52-62 | 63 | | time since an epoch in ms | machine id | sequence number | sign | ## Enhanced Specification