{"id":13344036,"url":"https://github.com/svelterust/utils","last_synced_at":"2026-02-10T10:36:31.519Z","repository":{"id":107172452,"uuid":"502681487","full_name":"svelterust/utils","owner":"svelterust","description":"Nice helper functions for build.zig","archived":false,"fork":false,"pushed_at":"2022-06-21T14:20:20.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T06:18:12.093Z","etag":null,"topics":["utils","zig"],"latest_commit_sha":null,"homepage":"","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/svelterust.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}},"created_at":"2022-06-12T17:19:50.000Z","updated_at":"2022-06-21T19:19:29.000Z","dependencies_parsed_at":"2023-04-03T17:47:41.701Z","dependency_job_id":null,"html_url":"https://github.com/svelterust/utils","commit_stats":null,"previous_names":["svelterust/utils"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/svelterust/utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelterust%2Futils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelterust%2Futils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelterust%2Futils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelterust%2Futils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svelterust","download_url":"https://codeload.github.com/svelterust/utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelterust%2Futils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268657541,"owners_count":24285521,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"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":["utils","zig"],"created_at":"2024-07-29T19:32:19.771Z","updated_at":"2026-02-10T10:36:26.484Z","avatar_url":"https://github.com/svelterust.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# utils\n\nCollection of useful functions for `build.zig`.\nExamples are listed in the source code.\n\n## Getting started\n\n```bash\ncurl https://raw.githubusercontent.com/knarkzel/utils/master/src/main.zig -o utils.zig\n```\n\n## Documentation\n\n```zig\npub const Options = struct {\n    enable_stdout: bool = false,\n    enable_stderr: bool = false,\n};\n\n/// Looks for build.zig by traversing from current directory and upwards,\n/// ideal for setting builder.build_root starting from builder.build_root\npub fn root(cwd: []const u8) UtilsError![]const u8\n\n/// Run shell command\npub fn exec(allocator: std.mem.Allocator, cwd: []const u8, argv: []const []const u8, opts: Options) !void\n\n/// Ensure repository exists, if not clone it with git. cwd is absolute path\npub fn ensure_repository(allocator: std.mem.Allocator, cwd: []const u8, path: []const u8, url: []const u8) !void\n\n/// Ensure submodules are initialized. cwd is absolute path\npub fn ensure_submodules(allocator: std.mem.Allocator, cwd: []const u8) !void\n\n/// Ensure zigmod has done initial fetch. cwd is absolute path\npub fn ensure_zigmod(allocator: std.mem.Allocator, cwd: []const u8) !void\n\n/// Ensure file exists, otherwise wget it. cwd is absolute path\npub fn ensure_file(allocator: std.mem.Allocator, cwd: []const u8, path: []const u8, url: []const u8) !void\n\n/// Ensure path exists, otherwise wget and extract it with tar. cwd is absolute path\npub fn ensure_tar(allocator: std.mem.Allocator, cwd: []const u8, path: []const u8, url: []const u8) !void\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvelterust%2Futils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvelterust%2Futils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvelterust%2Futils/lists"}