tensorush / zig-cookie

🦎 πŸͺ Zig implementation of the HTTP cookie specification.

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🦎 πŸͺ zig cookie

CI CD DC CC LC

Zig implementation of the HTTP cookie specification.

πŸš€ Usage

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

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

    Set <package_hash> to 12200000000000000000000000000000000000000000000000000000000000000000 and build your package to find the correct value specified in a compiler error message.

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

    build.zig example
    const cookie = b.dependency("cookie", .{});
    lib.root_module.addImport("cookie", cookie.module("cookie"));