Overview
The CAS service provides content-addressable blob storage where each blob is identified by its digest (hash). This enables efficient deduplication and content verification. Key features:- Content-addressed blob storage
- Batch read and write operations
- Missing blob detection
- Directory tree traversal
Configuration
The instance name identifying this CAS endpoint. Must match client configuration.
Reference to the store configured in the
stores section.gRPC Methods
FindMissingBlobs
Determines which blobs are missing from the CAS. Request:The instance name
List of digests to check
List of digests that are not present in the CAS
BatchUpdateBlobs
Upload multiple blobs in a single request. Request:The instance name
Array of upload requests, each containing:
digest: Content digestdata: Blob data (bytes)compressor: Optional compression (identity, zstd, deflate)
Array of responses for each blob:
digest: The blob digeststatus: gRPC status (OK on success)
Batch operations are limited by
max_decoding_message_size (default 4MB)BatchReadBlobs
Download multiple blobs in a single request. Request:The instance name
List of blob digests to read
List of acceptable compression algorithms (identity, zstd, deflate)
Array of responses for each blob:
digest: The blob digestdata: Blob data (bytes)compressor: Compression usedstatus: gRPC status
GetTree
Recursively fetch a directory tree. Request:The instance name
Digest of the root Directory message
Maximum number of directories per response (default: all)
Token for pagination
List of Directory messages
Token for fetching next page
Error Codes
| Code | Description |
|---|---|
NOT_FOUND | Blob or instance not found |
INVALID_ARGUMENT | Invalid digest format or instance name |
RESOURCE_EXHAUSTED | Request too large |
INTERNAL | Storage backend error |
Implementation Details
Fromnativelink-service/src/cas_server.rs:
The CAS service follows the Remote Execution API v2 specification