Clone this repo:
  1. 700eab7 Return repo_metadata from repository rules (#152) by Keith Smiley · 7 days ago upstream/main
  2. 251ab45 Drop dev version (#151) by Fabian Meumertzheim · 10 days ago
  3. 679251c Add feature for * in toolchains_aspects (#150) by Richard Lavoie · 11 days ago v1.51.0
  4. 3969b2d Add feature for param_file_name param of cc_internal.get_link_args() (#149) by Philip Zembrod · 4 weeks ago v1.50.0
  5. 331d1df Update actions/checkout action to v7 (#148) by renovate[bot] · 4 weeks ago

Bazel Features

Use this to determine the availability of a Bazel feature in your ruleset. It works under the hood by comparing the Bazel version against a known range in which the feature is available. Example usage:

load("@bazel_features//:features.bzl", "bazel_features")
if bazel_features.toolchains.has_optional_toolchains:
    # Do something

The features.bzl file contains the list of features.

Accessing globals

References to global Starlark symbols that do not exist cause load time errors, which means that their availability in Bazel cannot be tested via a regular feature. Instead, use bazel_features.globals.<symbol>, which is <symbol> if the symbol is available and None else.

See globals.bzl for the list of symbols that can be checked for in this way.