{"id":14990729,"url":"https://github.com/softprops/zig-retry","last_synced_at":"2025-04-12T02:43:36.778Z","repository":{"id":251574722,"uuid":"837809419","full_name":"softprops/zig-retry","owner":"softprops","description":"♻️ Retry faillible zig functions","archived":false,"fork":false,"pushed_at":"2024-08-05T12:11:20.000Z","size":18,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T10:49:18.155Z","etag":null,"topics":["retry","retry-library","zig","zig-library","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softprops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-08-04T05:19:37.000Z","updated_at":"2025-03-04T18:50:51.000Z","dependencies_parsed_at":"2024-09-24T16:04:12.351Z","dependency_job_id":"16df9b2e-be72-4cfc-a568-5a7c182a7ac6","html_url":"https://github.com/softprops/zig-retry","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"7d7d90914ca84c41a7c5597a6038ea5282a87e11"},"previous_names":["softprops/zig-retry"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fzig-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fzig-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fzig-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Fzig-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/zig-retry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248507809,"owners_count":21115677,"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":["retry","retry-library","zig","zig-library","zig-package"],"created_at":"2024-09-24T14:20:40.107Z","updated_at":"2025-04-12T02:43:36.754Z","avatar_url":"https://github.com/softprops.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    ♻️ zig retry\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n    A retry library for fault tolerant zig applications\n\u003c/div\u003e\n\n---\n\n[![Main](https://github.com/softprops/zig-retry/actions/workflows/ci.yml/badge.svg)](https://github.com/softprops/zig-retry/actions/workflows/ci.yml) ![License Info](https://img.shields.io/github/license/softprops/zig-retry) ![Release](https://img.shields.io/github/v/release/softprops/zig-retry) [![Zig Support](https://img.shields.io/badge/zig-0.13.0-black?logo=zig)](https://ziglang.org/documentation/0.13.0/)\n\nA goal of any operation should be a successful outcome. This package gives operations a better chance at achieving that.\n\n## 📼 installing\n\nCreate a new exec project with `zig init`. Copy an example from the examples directory into your into `src/main.zig`\n\nCreate a `build.zig.zon` file to declare a dependency\n\n\u003e .zon short for \"zig object notation\" files are essentially zig structs. `build.zig.zon` is zigs native package manager convention for where to declare dependencies\n\nStarting in zig 0.12.0, you can use and should prefer\n\n```sh\nzig fetch --save https://github.com/softprops/zig-retry/archive/refs/tags/v0.1.0.tar.gz\n```\n\notherwise, to manually add it, do so as follows\n\n```diff\n.{\n    .name = \"my-app\",\n    .version = \"0.1.0\",\n    .dependencies = .{\n+       // 👇 declare dep properties\n+        .jwt = .{\n+            // 👇 uri to download\n+            .url = \"https://github.com/softprops/zig-retry/archive/refs/tags/v0.1.0.tar.gz\",\n+            // 👇 hash verification\n+            .hash = \"...\",\n+        },\n    },\n}\n```\n\n\u003e the hash below may vary. you can also depend any tag with `https://github.com/softprops/zig-retry/archive/refs/tags/v{version}.tar.gz` or current main with `https://github.com/softprops/zig-retry/archive/refs/heads/main/main.tar.gz`. to resolve a hash omit it and let zig tell you the expected value.\n\nAdd the following in your `build.zig` file\n\n```diff\nconst std = @import(\"std\");\n\npub fn build(b: *std.Build) void {\n    const target = b.standardTargetOptions(.{});\n\n    const optimize = b.standardOptimizeOption(.{});\n    // 👇 de-reference dep from build.zig.zon\n+    const retry = b.dependency(\"retry\", .{\n+        .target = target,\n+        .optimize = optimize,\n+    }).module(\"retry\");\n    var exe = b.addExecutable(.{\n        .name = \"your-exe\",\n        .root_source_file = .{ .path = \"src/main.zig\" },\n        .target = target,\n        .optimize = optimize,\n    });\n    // 👇 add the module to executable\n+    exe.root_mode.addImport(\"retry\", retry);\n\n    b.installArtifact(exe);\n}\n```\n\n## examples\n\nSee examples directory\n\n## 🥹 for budding ziglings\n\nDoes this look interesting but you're new to zig and feel left out? No problem, zig is young so most us of our new are as well. Here are some resources to help get you up to speed on zig\n\n- [the official zig website](https://ziglang.org/)\n- [zig's one-page language documentation](https://ziglang.org/documentation/0.13.0/)\n- [ziglearn](https://ziglearn.org/)\n- [ziglings exercises](https://github.com/ratfactor/ziglings)\n\n\n\\- softprops 2024\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fzig-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Fzig-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Fzig-retry/lists"}