tensorush / zig-typeid

🦎 ℹ️ Zig port of the TypeID type-safe extension of UUIDv7 created by @loreto.

Home Page:https://tensorush.github.io/zig-typeid/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🦎 ℹ️ zig typeid

CI CD Docs Codecov License

Zig implementation of TypeID, a type-safe extension of UUIDv7, created by the jetpack.io team.

🚀 Usage

  1. Add typeid as a dependency in your build.zig.zon.

    build.zig.zon example
    .{
        .name = "<name_of_your_package>",
        .version = "<version_of_your_package>",
        .dependencies = .{
            .typeid = .{
                .url = "https://github.com/tensorush/zig-typeid/archive/<git_tag_or_commit_hash>.tar.gz",
                .hash = "<package_hash>",
            },
        },
    }

    Set <package_hash> to 12200000000000000000000000000000000000000000000000000000000000000000, and Zig will provide the correct found value in an error message.

  2. Add typeid as a module in your build.zig.

    build.zig example
    const typeid = b.dependency("typeid", .{});
    exe.addModule("typeid", typeid.module("typeid"));

About

🦎 ℹ️ Zig port of the TypeID type-safe extension of UUIDv7 created by @loreto.

https://tensorush.github.io/zig-typeid/

License:MIT License


Languages

Language:Zig 100.0%