{"id":16305190,"url":"https://github.com/moznion/metro-zig","last_synced_at":"2025-10-25T14:30:31.591Z","repository":{"id":55825840,"uuid":"523250483","full_name":"moznion/metro-zig","owner":"moznion","description":"MetroHash library for Zig","archived":false,"fork":false,"pushed_at":"2023-12-15T05:42:21.000Z","size":12,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T07:34:19.530Z","etag":null,"topics":["metrohash","zig","ziglang"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moznion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-10T07:49:46.000Z","updated_at":"2022-08-13T06:32:55.000Z","dependencies_parsed_at":"2023-01-18T21:46:04.037Z","dependency_job_id":null,"html_url":"https://github.com/moznion/metro-zig","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fmetro-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fmetro-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fmetro-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fmetro-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moznion","download_url":"https://codeload.github.com/moznion/metro-zig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238155462,"owners_count":19425719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["metrohash","zig","ziglang"],"created_at":"2024-10-10T21:05:57.828Z","updated_at":"2025-10-25T14:30:31.300Z","avatar_url":"https://github.com/moznion.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MetroHash for Zig [![test](https://github.com/moznion/metro-zig/actions/workflows/test.yaml/badge.svg)](https://github.com/moznion/metro-zig/actions/workflows/test.yaml)\n\n[MetroHash](http://www.jandrewrogers.com/2015/05/27/metrohash/) library for [Zig](https://ziglang.org/).\n\nThis library provides 64-bit and 128-bit MetroHash hashing functions.\n\n## Synopsis\n\n### 64-bit Hash\n\n```zig\nvar data = [_]u8{\n    48, 49, 50, 51, 52, 53, 54, 55,\n    56, 57, 48, 49, 50, 51, 52, 53,\n    54, 55, 56, 57, 48, 49, 50, 51,\n    52, 53, 54, 55, 56, 57, 48, 49,\n    50, 51, 52, 53, 54, 55, 56, 57,\n    48, 49, 50, 51, 52, 53, 54, 55,\n    56, 57, 48, 49, 50, 51, 52, 53,\n    54, 55, 56, 57, 48, 49, 50,\n};\nconst seed: u64 = 1;\nconst hash: u64 = hash64(data[0..], seed);\n```\n\n### 128-bit Hash\n\n```zig\nvar data = [_]u8{\n    48, 49, 50, 51, 52, 53, 54, 55,\n    56, 57, 48, 49, 50, 51, 52, 53,\n    54, 55, 56, 57, 48, 49, 50, 51,\n    52, 53, 54, 55, 56, 57, 48, 49,\n    50, 51, 52, 53, 54, 55, 56, 57,\n    48, 49, 50, 51, 52, 53, 54, 55,\n    56, 57, 48, 49, 50, 51, 52, 53,\n    54, 55, 56, 57, 48, 49, 50,\n};\nconst seed: u64 = 1;\nconst hash: u128 = hash128(data[0..], seed);\n```\n\n## How to build and test\n\n```\n$ git submodule init \u0026\u0026 git submodule update\n$ zig build test\n```\n\n## Note\n\nThis implementation is based on [jandrewrogers/MetroHash](https://github.com/jandrewrogers/MetroHash) and [dgryski/go-metro](https://github.com/dgryski/go-metro).\n\n## License\n\nMIT\n\n## Author\n\nmoznion (\u003cmoznion@mail.moznion.net\u003e)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fmetro-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoznion%2Fmetro-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fmetro-zig/lists"}