Skip to content

Configuration examples

To connect NativeLink to your Pantsbuild project, just add the code below to your pants.toml file. If you can’t find a pants.toml file - create one in the root directory of your Pantsbuild project.

  1. Configure your pants.toml

    • Copy the following lines into your pants.toml:
      [GLOBAL]
      remote_cache_read = true
      remote_cache_write = true
      remote_store_address = "[REMOTE_STORE_ADDRESS]"
      [GLOBAL.remote_store_headers]
      x-nativelink-api-key = "[API_KEY]"
  2. Validate Connection

    • Once you’ve added those lines to your pants.toml, run the following command to execute a build:
      pants --no-pantsd --level=trace --no-local-cache test ::
    • You will see remote cache utilization on the Dashboard page if your pants.toml is configured correctly.