Skip to content

Rules, macros, and APIs that are useful for the implementation of Bazel repositories.

License

Notifications You must be signed in to change notification settings

cgrindel/bazel-starlib

Folders and files

NameName
Last commit message
Last commit date
Jul 14, 2024
Jun 13, 2024
Jul 6, 2023
Feb 1, 2023
Oct 21, 2023
Mar 14, 2023
Mar 14, 2023
Mar 23, 2024
Oct 21, 2023
Mar 23, 2024
Jul 14, 2024
Jun 3, 2024
Nov 9, 2022
May 22, 2024
Mar 22, 2023
Dec 19, 2023
Jun 3, 2024
Nov 9, 2022
Oct 21, 2023
Jul 23, 2023
Jun 25, 2024
Mar 23, 2024
Sep 23, 2023
Nov 18, 2023
Oct 30, 2021
Jul 14, 2024
Mar 23, 2024
Jul 23, 2023
Jul 27, 2023
Jul 23, 2023
Jul 13, 2024
Jun 26, 2024
Jun 26, 2024
Jun 26, 2024
Oct 21, 2023

Repository files navigation

Bazel Starlib

Build

Bazel Starlib is a collection of projects that contain rulesets and libraries that are useful for the implementation of Bazel projects.

Project Description Documentation
bazeldoc Generate Starlark documentation using Bazel Stardoc. Formerly hosted as bazel-doc. API, How-to
bzlformat Format Bazel Starlark files using Buildifier, test that the formatted files exist in the workspace directory, and copy formatted files to the workspace directory. Formerly hosted as rules_bzlformat. API, How-to, Examples
bzllib Collection of Starlark libraries. API, How-to
bzlrelease Automate and customize the generation of releases using GitHub Actions. API, How-to
bzltidy Collect Bazel actions that keep your source files up-to-date. API, How-to
markdown Maintain markdown files. API, How-to, Examples
shlib Collection of libraries useful when implementing shell binaries, libraries, and tests. Formerly hosted as bazel_shlib. API, How-to
updatesrc Copy files from the Bazel output directories to the workspace directory. Formerly hosted as rules_updatesrc API, How-to, Examples

Table of Contents

Quickstart

The following provides a quick introduction on how to load this repository into your workspace. For more information on how to use the projects from this repository in your workspace, check out the how-to links above and review the the generated documentation.

MODULE.bazel Snippet

bazel_dep(name = "cgrindel_bazel_starlib", version = "0.20.2")

Workspace Configuration

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "cgrindel_bazel_starlib",
    sha256 = "1749e14037e67cfeaf28b71334ef4ade7727edaafc890f8cee7648939eae77d4",
    urls = [
        "https://github.com/cgrindel/bazel-starlib/releases/download/v0.20.2/bazel-starlib.v0.20.2.tar.gz",
    ],
)

load("@cgrindel_bazel_starlib//:deps.bzl", "bazel_starlib_dependencies")

bazel_starlib_dependencies()

load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

Developer Documentation

To Add a Golang Dependency

Execute the following to update the go module files, resolve the Golang dependencies and update the Bazel build files.

$ bazel run @io_bazel_rules_go//go -- github.com/sweet/go_pkg
$ bazel run //:go_mod_tidy
$ bazel run //:gazelle_update_repos
$ bazel run //:update_build_files

Other Documentation