# bazel_features **Repository Path**: hilbert-wang/bazel_features ## Basic Information - **Project Name**: bazel_features - **Description**: https://github.com/bazel-contrib/bazel_features - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: alexeagle/bzlmod - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-11 - **Last Updated**: 2024-11-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 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: ```starlark load("@bazel_features//:features.bzl", "bazel_features") if bazel_features.toolchains.has_optional_toolchains: # Do something ``` The [`features.bzl`](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.`, which is `` if the symbol is available and `None` else. See [`globals.bzl`](private/globals.bzl) for the list of symbols that can be checked for in this way.