Prerequisites
- Buck2 installed (latest stable version)
- A running NativeLink instance (see Quickstart)
- Basic understanding of Buck2 build configuration
Configuration
Buck2’s remote execution is configured through the.buckconfig file in your project root.
Basic Setup
Create platform definitions
Define your execution platforms in Create
platforms/BUCK:platforms/BUCK
platforms/defs.bzl:platforms/defs.bzl
NativeLink Server Configuration
Configure NativeLink to handle Buck2 requests. Here’s a configuration example:buck2_cas.json5
Running Buck2 with NativeLink
Configuration Options
Remote Execution Client
The[buck2_re_client] section supports the following options:
Key Configuration Fields
| Field | Description |
|---|---|
engine_address | Remote execution scheduler endpoint |
action_cache_address | Action cache service endpoint |
cas_address | Content Addressable Storage endpoint |
tls | Enable TLS (true/false) |
instance_name | Instance name for multi-tenant setups |
tls_ca_cert | Path to CA certificate for TLS |
tls_client_cert | Path to client certificate for mTLS |
tls_client_key | Path to client key for mTLS |
Platform Properties
Define execution requirements through platform properties:platforms/defs.bzl
Testing Your Configuration
Troubleshooting
Connection errors
Verify NativeLink is running and accessible:TLS handshake failures
Ensure certificates are correctly configured:Platform not found
Verify platform definitions exist and are referenced correctly in.buckconfig.