Skip to content

Instantly share code, notes, and snippets.

@theCompanyDream
Last active January 30, 2026 14:04
Show Gist options
  • Select an option

  • Save theCompanyDream/de1494b9b11d5ffdf9018ce1dffa5788 to your computer and use it in GitHub Desktop.

Select an option

Save theCompanyDream/de1494b9b11d5ffdf9018ce1dffa5788 to your computer and use it in GitHub Desktop.

Java: The callicoder/java-snowflake repository provides a clear, distributed unique ID generator implementation, often used as a learning resource. Another optimized, high-throughput implementation using Compare-And-Swap (CAS) is available at HMWCS/java-snowflake-id-generator.

Go (Golang): bwmarrin/snowflake is a simple-to-use Go implementation that follows the original Twitter format. Another lock-free, high-scale implementation can be found at godruoyi/go-snowflake.

.NET (C#): JakobKirton/SnowflakeGenerator offers a C# implementation compatible with .NET Standard 2.0 and available as a NuGet package. For a simple and thread-safe generator, see TanerSaydam/SnowflakeIdGeneratorForCSharp.

Rust: The archer-321/snowdon project provides a lightweight, thread-safe library supporting custom formats and epochs.

Node.js/TypeScript: For JavaScript environments, AkashRajpurohit/snowflake-id is a lightweight library that generates 64-bit. IDs in string format due to JavaScript's integer precision limits.

Python: While not a direct result in the snippets, many Python libraries exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment