Skip to main content
The RBS DSL is a Python-like configuration language used to define build targets, dependencies, and project settings. It supports variables, functions, loops, conditionals, and string operations.

WORKSPACE.rbs

The workspace file configures project-wide settings, toolchains, and external dependencies.

config_setting

Define workspace-level configuration values:

load

Import rules and functions from RBS SDKs or other .rbs files:

print

Output messages during workspace evaluation:

BUILD.rbs

Build files define targets within a package.

native.task

The most basic target — runs a shell command:

native.filegroup

Group files together for use as dependencies:

native.genrule

General-purpose rule for custom build steps with file operations:
With an action function for advanced control:

Built-in variables

Built-in functions

glob(patterns, exclude=[])

Match files using glob patterns:

select(conditions)

Choose values based on platform or configuration:

Language features

Variables and expressions

Conditionals

Loops

List comprehensions

Functions

External dependencies

Declaring dependencies in WORKSPACE.rbs

Using dependencies in BUILD.rbs

Toolchains

Register language toolchains in WORKSPACE.rbs:
RBS automatically downloads and manages these toolchains. No system installation required.

Next steps

Custom Rules

Learn how to define your own build rules with the Rule SDK.

Examples

See complete project examples using the RBS DSL.