Skip to content

Commit

Permalink
Update README.md and bump version to 4.0.0 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbukin authored Nov 14, 2024
1 parent 32f91e9 commit b1f81ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,26 @@
# Dodo.Primitives

[![Latest release](https://img.shields.io/badge/nuget-3.0.0-blue?&kill_cache=1)](https://www.nuget.org/packages/Dodo.Primitives/3.0.0)
[![Latest release](https://img.shields.io/badge/nuget-4.0.0-blue?&kill_cache=1)](https://www.nuget.org/packages/Dodo.Primitives/4.0.0)
[![codecov](https://codecov.io/gh/dodobrands/primitives/graph/badge.svg?token=7ILQPREIVA)](https://codecov.io/gh/dodobrands/primitives)

Library provides .NET primitive types:

- [Uuid](./src/Dodo.Primitives/Uuid.cs)

and utils to work with types:

- [Hex](./src/Dodo.Primitives/Hex.cs)

## Project goal

The main goal is Uuid implementation according to the [RFC4122](https://tools.ietf.org/html/rfc4122).

.NET provides [System.Guid](https://docs.microsoft.com/en-us/dotnet/api/system.guid) struct which is special case of the RFC4122 implementation. System.Guid has [little-endian layout](https://github.com/dotnet/runtime/blob/v8.0.0/src/libraries/System.Private.CoreLib/src/System/Guid.cs#L33-L35) for the first 8 bytes (int32, int16, int16).
The main goal is Uuid implementation according to the [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html).

Our goal is to provide Uuid fully compliant with RFC4122 (big-endian layout) and preserve System.Guid-like behaviour. Also project contains generators to create different Uuid variants. Currently supported variants:
.NET provides [System.Guid](https://docs.microsoft.com/en-us/dotnet/api/system.guid) struct which is special case of the RFC9562 implementation. System.Guid has [little-endian layout](https://github.com/dotnet/runtime/blob/v9.0.0/src/libraries/System.Private.CoreLib/src/System/Guid.cs#L44-L46) for the first 8 bytes (int32, int16, int16).

- Time-based (like [Uuid v1](https://tools.ietf.org/html/rfc4122#section-4.1.3)).
Our goal is to provide Uuid fully compliant with RFC9562 (big-endian layout) and preserve System.Guid-like behaviour.
Also project contains generators to create Uuid version 7.

```csharp
var uuid = Uuid.NewTimeBased();
var uuid = Uuid.CreateVersion7();
```

- Time-based, optimized for MySQL.

```csharp
var uuid = Uuid.NewMySqlOptimized();
```

Equals `UUID_TO_BIN(UUID(), 1)` from [MySQL 8.0](https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_uuid-to-bin)

## Project documentation

- [Prerequisites, build and development](https://github.com/dodobrands/primitives/wiki/Prerequisites,-build-and-development)
- [Benchmarks](https://github.com/dodobrands/primitives/wiki/Benchmarks)

2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>4.0.0</VersionPrefix>
<VersionSuffix>beta1</VersionSuffix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>

0 comments on commit b1f81ae

Please sign in to comment.