{"id":50945901,"url":"https://github.com/cedi/zig-raft","last_synced_at":"2026-06-17T20:05:50.515Z","repository":{"id":360451608,"uuid":"1246936306","full_name":"cedi/zig-raft","owner":"cedi","description":"Just a learning repo, implementing raft (maybe) in zig","archived":false,"fork":false,"pushed_at":"2026-05-26T12:55:57.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T14:16:57.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cedi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-22T18:08:47.000Z","updated_at":"2026-05-26T12:56:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cedi/zig-raft","commit_stats":null,"previous_names":["cedi/zig-raft"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cedi/zig-raft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedi%2Fzig-raft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedi%2Fzig-raft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedi%2Fzig-raft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedi%2Fzig-raft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cedi","download_url":"https://codeload.github.com/cedi/zig-raft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cedi%2Fzig-raft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34463562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-06-17T20:05:49.970Z","updated_at":"2026-06-17T20:05:50.508Z","avatar_url":"https://github.com/cedi.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig raft\n\nHopefully, one day a full [raft] implementation in [zig].\n\nWhy? Because.\n\n\u003e [!NOTE]\n\u003e This is just a research project for me to learn [zig] and have fun implementing [raft]\n\n[zig]: https://ziglang.org/\n[raft]: https://raft.github.io/\n\n## Design\n\n```mermaid\nflowchart TD\n    client[Client]\n    server[Server]\n    log[Log]\n    sm[StateMachine]\n\n    client --\u003e server\n    server --\u003e|apppend| log\n    log --\u003e|apply| sm\n    sm --\u003e|result via future| server\n```\n\n### Log Structure\n\nSee [wal-format](./docs/wal-format.md)\n\n### State Machine\n\n```mermaid\nflowchart TD\n    A[apply_loop ticks] --\u003e B{applied_index \u003c commit_index?}\n    B --\u003e|no| A\n    B --\u003e|yes| C[cmd = log.get\u003cbr/\u003eapplied_index + 1]\n    C --\u003e D{cmd_tag}\n    D --\u003e|Set| E[map.put key, value]\n    D --\u003e|Delete| F[map.remove key]\n    D --\u003e|Cas| G{map.get key == expected?}\n    G --\u003e|yes| H[map.put key, new]\n    G --\u003e|no| I[result: CasMismatch]\n    E --\u003e J[applied_index += 1]\n    F --\u003e J\n    H --\u003e J\n    I --\u003e J\n    J --\u003e K[wake waiter for this index]\n    K --\u003e A\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedi%2Fzig-raft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcedi%2Fzig-raft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcedi%2Fzig-raft/lists"}