Skip to content

Bazel Cloud Quickstart

To connect NativeLink to your Bazel project, just add the code below to your .bazelrc file. If you can’t find a .bazelrc file - create one in the same directory as your Bazel WORKSPACE or MODULE.bazel file.

  1. Configure your .bazelrc

    • Copy the following lines into your .bazelrc:
      build --remote_cache=[CLAIM_CAS_URL]
      build --remote_header=x-nativelink-api-key=[API_KEY]
      build --remote_timeout=600
      build --bes_backend=[CLAIM_BES_URL]
      build --bes_header=x-nativelink-api-key=[API_KEY]
      build --remote_timeout=600
  2. Validate Connection

    • Once you’ve added those lines to your .bazelrc, run a Bazel build.
    • You will see remote cache utilization on the Dashboard page if your .bazelrc is configured correctly.