{"id":19589683,"url":"https://github.com/flolu/bazel","last_synced_at":"2025-02-26T13:26:47.508Z","repository":{"id":119944057,"uuid":"605552382","full_name":"flolu/bazel","owner":"flolu","description":"🌿 Getting started with Bazel for absolute beginners","archived":false,"fork":false,"pushed_at":"2023-02-25T10:04:00.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-09T06:28:43.983Z","etag":null,"topics":["bazel","bazel-rules","bazelisk","build-tool","buildifier","github-actions","starlark","tutorial"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=6MXjAZWmn4Y","language":"Starlark","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/flolu.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":"2023-02-23T12:00:08.000Z","updated_at":"2023-03-14T10:42:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"85e9749e-4b95-4c25-aa9d-bcdcd2226fcc","html_url":"https://github.com/flolu/bazel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fbazel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fbazel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fbazel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flolu%2Fbazel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flolu","download_url":"https://codeload.github.com/flolu/bazel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240860493,"owners_count":19869340,"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":["bazel","bazel-rules","bazelisk","build-tool","buildifier","github-actions","starlark","tutorial"],"created_at":"2024-11-11T08:20:14.775Z","updated_at":"2025-02-26T13:26:47.431Z","avatar_url":"https://github.com/flolu.png","language":"Starlark","readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e🌿 Bazel for beginners\u003c/h1\u003e\n  \u003cp\u003eGetting started with Bazel for absolute beginners\u003c/p\u003e\n\u003c/div\u003e\n\n# About Bazel\n\n- [Bazel](https://bazel.build) is a tool to **build** and **test** software at any scale\n- It's **extremely fast** and makes builds reproducible\n- It's able to build **any language**\n- It's used by many [big companies](https://bazel.build/community/users)\n\n# Bazel Basics\n\n- The `WORKSPACE` file marks the root of a Bazel **workspace**\n- `BUILD` files mark a directory as a **package**\n- Build **targets** are defined inside`BUILD` files\n- Targets are defined by **rules**\n- Rules are written in Starlark (But most end users won't rules themselves)\n\n# Usage\n\n**Installation**\n\n- Install [Bazelisk](https://github.com/bazelbuild/bazelisk) to manage different version of Bazel\n  - With NPM: `npm i -g @bazel/bazelisk` (requires Node.js)\n  - On macOS: `brew install bazelisk`\n\n**Commands**\n\n- `bazel version` (Get version of Bazel)\n- `bazel build //...` (Build everything)\n- `bazel clean` (Clean Bazel outputs)\n- `bazel build //files/...` (Build everything inside the `files` package)\n- `bazel build //:bazel_slogan` (Only build the `bazel_slogan` target)\n- `bazel test //...` (Test everything)\n- `bazel query ...` (List all targets)\n- `bazel query --noimplicit_deps 'deps(:bazel_slogan_test)' --output graph | dot -Tpng \u003e graph.png` (Generate a graph dependency graph of the `:bazel_slogan_test` target)\n\n\u003e 💡 You can also omit the `//`\n\n**Development Environment**\n\n- Install the official [Bazel extensions](https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel)\n- Install [Buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier) for formatting\n  - With NPM: `npm i -g @bazel/buildifier` (requires Node.js)\n  - On macOS: `brew install buildifier`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflolu%2Fbazel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflolu%2Fbazel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflolu%2Fbazel/lists"}