Zig implementation of the exponential backoff algorithm.
-
Add
backoff
as a dependency in yourbuild.zig.zon
.build.zig.zon
example.{ .name = "<name_of_your_package>", .version = "<version_of_your_package>", .dependencies = .{ .backoff = .{ .url = "https://github.com/tensorush/zig-backoff/archive/<git_tag_or_commit_hash>.tar.gz", .hash = "<package_hash>", }, }, }
Set
<package_hash>
to12200000000000000000000000000000000000000000000000000000000000000000
, and Zig will provide the correct found value in an error message. -
Add
backoff
as a module in yourbuild.zig
.build.zig
exampleconst backoff = b.dependency("backoff", .{}); exe.addModule("Backoff", backoff.module("Backoff"));