{"id":15099819,"url":"https://github.com/burlindw/zig-build-utils","last_synced_at":"2026-01-07T10:03:37.749Z","repository":{"id":251854545,"uuid":"838633105","full_name":"burlindw/zig-build-utils","owner":"burlindw","description":"A collection of common utilities for Zig build scripts inspired by the build scripts used by Zig and ZLS.","archived":false,"fork":false,"pushed_at":"2025-01-20T01:43:06.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T20:45:13.326Z","etag":null,"topics":["zig","zig-package","zig-tools"],"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/burlindw.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T03:48:19.000Z","updated_at":"2025-01-20T01:43:07.000Z","dependencies_parsed_at":"2025-02-01T20:42:08.979Z","dependency_job_id":"27d29631-fe57-4173-98ab-1b3668d94ecc","html_url":"https://github.com/burlindw/zig-build-utils","commit_stats":null,"previous_names":["burlindw/zig-build-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlindw%2Fzig-build-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlindw%2Fzig-build-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlindw%2Fzig-build-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burlindw%2Fzig-build-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burlindw","download_url":"https://codeload.github.com/burlindw/zig-build-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245892059,"owners_count":20689438,"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":["zig","zig-package","zig-tools"],"created_at":"2024-09-25T17:27:52.906Z","updated_at":"2026-01-07T10:03:32.709Z","avatar_url":"https://github.com/burlindw.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-build-utils\n\nA collection of common utilities for Zig build scripts inspired by the build\nscripts used by [Zig](https://github.com/ziglang/zig) and [ZLS](https://github.com/zigtools/zls).\n\n## How to use\n\nRun the following command from a project's root to add `zig-build-utils` as\nas dependency:\n\n```sh\nzig fetch --save git+https://github.com/burlindw/zig-build-utils.git\n```\n\nImport `build-utils` in `build.zig`. It is not necessary to call `std.Build.dependency()`\nas there are no exported modules or artifacts.\n\n```zig\nconst std = @import(\"std\");\nconst utils = @import(\"build-utils\");\n\npub fn build(b: *std.Build) void {\n    const target = b.standardTargetOptions(.{});\n    const optimize = b.standardOptimizeOption(.{});\n\n    // Get the project version using a combination of the 'build.zig.zon'\n    // manifest file, the git history, and git tags.\n    const version = utils.getBuildVersion(b);\n\n    const exe = b.addExecutable(.{\n        .name = \"example\",\n        .target = target,\n        .optimize = optimize,\n        .version = version,\n        .root_source_file = b.path(\"src/main.zig\"),\n    });\n    b.installArtifact(exe);\n\n    // Compress the binary (and any associated pdb, h, or lib files) into\n    // a zip file or tarball (depending on the target) and install it in the\n    // prefix directory. The subdirectory within the prefix directory and\n    // the layout within the archive are both configurable.\n    utils.installArchivedArtifact(exe, .{});\n}\n```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburlindw%2Fzig-build-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburlindw%2Fzig-build-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburlindw%2Fzig-build-utils/lists"}