DEV Community

Cover image for πŸš€ Introducing ByteAether.Ulid: A High-Performance .NET Library for ULIDs
GigAHerZ
GigAHerZ

Posted on β€’ Edited on β€’ Originally published at byteaether.github.io

1 1

πŸš€ Introducing ByteAether.Ulid: A High-Performance .NET Library for ULIDs

Hey .NET devs! Tired of GUIDs that are impossible to sort or read? Meet ByteAether.Ulid, a blazing-fast library for generating Universally Unique Lexicographically Sortable Identifiers (ULIDs) in your .NET projects.

Why You’ll Love ByteAether.Ulid

  1. Globally Unique & Sortable: No collisions, even in distributed systems. Lexicographically ordered for time-based sorting.
  2. Human-Readable: Base32 encoding makes IDs easy to interpret (no more cryptic GUIDs!).
  3. Error-Free: Gracefully handles edge cases like random-part overflowβ€”no more crashes!
  4. Lightning-Fast: Outperforms competitors like NetUlid, NUlid, and Cysharp’s Ulid in benchmarks.

Key Features

  • Seamless .NET Integration: Works with .NET Standard 2.0 to .NET 9.0, ASP.NET Core routes, and System.Text.Json.
  • Versatile Conversions: Convert ULIDs to/from byte arrays, GUIDs, or strings effortlessly.
  • Open Source & MIT Licensed: Contribute, report bugs, or suggest features on GitHub!

Quick Start

Install via NuGet:

dotnet add package ByteAether.Ulid
Enter fullscreen mode Exit fullscreen mode

Generate a ULID in seconds:

using ByteAether.Ulid;

var ulid = Ulid.New();  
Console.WriteLine(ulid.ToString()); // Output: "01JJSNJ59NFZDV9MZRV3BMBM9W"  
Enter fullscreen mode Exit fullscreen mode

Performance Wins

ByteAether.Ulid is the fastest and most compliant ULID library for .NET:

Library Speed Compliance Error Handling
ByteAether.Ulid βœ… βœ… βœ…
NetUlid ⚠️ βœ… ⚠️
NUlid ⚠️ βœ… ⚠️
Cysharp.Ulid ⚠️ ❌ ⚠️

Next Steps

Read the full blog post for deep dives into ULID use cases and benchmarks: ByteAether.Ulid v1.0.0 Announcement
Explore the GitHub repo and contribute: GitHub - ByteAether/Ulid

Ready to simplify your .NET projects? Give ByteAether.Ulid a spin and say goodbye to GUID headaches! 🌟

(P.S. Stay tuned for upcoming posts on optimizing databases and distributed systems with ULIDs!)

Top comments (0)