{"id":13450718,"url":"https://github.com/bazel-contrib/bazel-lib","last_synced_at":"2026-01-18T04:07:27.831Z","repository":{"id":37028476,"uuid":"425866965","full_name":"bazel-contrib/bazel-lib","owner":"bazel-contrib","description":"Common useful functions for writing BUILD files and Starlark macros/rules","archived":false,"fork":false,"pushed_at":"2026-01-12T20:47:31.000Z","size":4545,"stargazers_count":173,"open_issues_count":75,"forks_count":118,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-01-13T01:29:50.117Z","etag":null,"topics":["aspect-build","bazel","bazel-rules"],"latest_commit_sha":null,"homepage":"https://registry.bazel.build/docs/bazel_lib","language":"Starlark","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazel-contrib.png","metadata":{"funding":{"open_collective":"bazel-rules-authors-sig"},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-11-08T14:20:25.000Z","updated_at":"2026-01-11T11:20:49.000Z","dependencies_parsed_at":"2024-01-29T19:18:02.501Z","dependency_job_id":"2d59476d-0a37-41b5-9e8a-f426b45b9141","html_url":"https://github.com/bazel-contrib/bazel-lib","commit_stats":{"total_commits":773,"total_committers":56,"mean_commits":"13.803571428571429","dds":0.6416558861578266,"last_synced_commit":"d042d563c6a91f7e11f66c42c83429199bd3d5d9"},"previous_names":["bazel-contrib/bazel-lib"],"tags_count":230,"template":false,"template_full_name":null,"purl":"pkg:github/bazel-contrib/bazel-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazel-contrib%2Fbazel-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazel-contrib%2Fbazel-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazel-contrib%2Fbazel-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazel-contrib%2Fbazel-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazel-contrib","download_url":"https://codeload.github.com/bazel-contrib/bazel-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazel-contrib%2Fbazel-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28529456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["aspect-build","bazel","bazel-rules"],"created_at":"2024-07-31T07:00:37.610Z","updated_at":"2026-01-18T04:07:27.814Z","avatar_url":"https://github.com/bazel-contrib.png","language":"Starlark","readme":"# Bazel helpers library\n\nBase Starlark libraries and basic Bazel rules which are useful for constructing rulesets and BUILD files.\n\n📚 **API documentation**: https://registry.bazel.build/docs/bazel_lib\n\n## 3.0 release\n\nThis branch has code for the 3.0 release of `bazel_lib`, to https://registry.bazel.build/modules/bazel_lib\n\nThe module has been renamed from the 2.x releases which used the name \"aspect_bazel_lib\".\nFollowing Aspect's donation to the Linux Foundation, the new name allows more of the community to participate without supporting one vendor.\nThis code is still in the `2.x` branch.\n\nThese two modules can be used in parallel during a transition. Note that `tar`, `jq` and `yq` have moved to their own modules as part of the 3.0 release.\n\n## Relationship to bazel-skylib\n\nThis module depends on [bazel-skylib](https://github.com/bazelbuild/bazel-skylib).\nIn theory all these utilities could be upstreamed to bazel-skylib, but the declared scope of that project\nis narrow and it no longer accepts feature requests, see https://github.com/orgs/bazelbuild/discussions/3.\nIt's possible that we may instead remove the dependency on bazel-skylib and entirely replace it, in an ABI-compatible sense. See https://github.com/bazel-contrib/bazel-lib/issues/927.\n\n## Installation\n\nInstallation instructions are included on each release:\n\u003chttps://github.com/bazel-contrib/bazel-lib/releases\u003e\n\nTo use a commit rather than a release, you can point at any SHA of the repo.\nHowever, this adds more \"dev dependencies\", as you'll have to build our helper programs\n(such as `copy_to_directory`, `expand_template`) from their Go sources rather than\ndownload pre-built binaries.\n\nFor example to use commit `abc123` in `MODULE.bazel`:\n\n```\n# Automatically picks up new Go dev dependencies\ngit_override(\n    module_name = \"bazel_lib\",\n    commit = \"abc123\",\n    remote = \"git@github.com:bazel-contrib/bazel-lib.git\",\n)\n```\n\nOr in `WORKSPACE`:\n\n1. Replace `url = \"https://github.com/bazel-contrib/bazel-lib/releases/download/v0.1.0/bazel-lib-v0.1.0.tar.gz\"`\n   with a GitHub-provided source archive like\n   `url = \"https://github.com/bazel-contrib/bazel-lib/archive/abc123.tar.gz\"`\n1. Replace `strip_prefix = \"bazel-lib-0.1.0\"` with `strip_prefix = \"bazel-lib-abc123\"`\n1. Update the `sha256`. The easiest way to do this is to comment out the line, then Bazel will\n   print a message with the correct value.\n1. `load(\"@bazel_lib//:deps.bzl\", \"go_dependencies\")` and then call `go_dependencies()`\n\n\u003e Note that GitHub source archives don't have a strong guarantee on the sha256 stability, see\n\u003e \u003chttps://github.blog/2023-02-21-update-on-the-future-stability-of-source-code-archives-and-hashes\u003e\n","funding_links":["https://opencollective.com/bazel-rules-authors-sig"],"categories":["Tooling","Starlark"],"sub_categories":["Starlark"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazel-contrib%2Fbazel-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazel-contrib%2Fbazel-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazel-contrib%2Fbazel-lib/lists"}