examples/. Each one has its own WORKSPACE.rbs and BUILD.rbs, downloads any tools it needs automatically, and can be run in place:
cd examples/hello-world— enters the example from the repository root; expect no output on success.rbs query //...— lists its targets; expecthello,greet,create_fileandshow_greeting.rbs run :hello— runs the greeting; expectHello, World!.
Start here
Work through these four in order — they build on each other.1
hello-world
The basics of
native.task: run commands, declare outputs, and chain targets with deps. Three files, two minutes.2
file-processing
File transformations with
native.genrule — declared inputs and outputs, shell commands, and a tool (jq) downloaded and verified automatically.3
tool-usage
Structured tool execution with
native.run_tool: precise argument lists, environment variables, and tools registered as toolchains.4
build-chain
A complete pipeline that mixes
task, genrule, and run_tool into a multi-step workflow producing an HTML report.- filegroup-glob-demo — collecting sources with
glob()and grouping them withnative.filegroup. - scaffolding-demo — code generation from templates with
rbs scaffold: variable substitution in file names (__className__.py) and content (<%= className %>), with Python, React, and API templates to copy from.
Language toolchains
Each of these demonstrates a hermetic toolchain: rbs downloads the pinned compiler or runtime on first build, so no system installation is required.go-hello
go_binary and go_library with an auto-downloaded Go SDK.c-hello / cxx-hello
c_binary, cxx_binary, and cxx_library using a Zig-backed hermetic C/C++ toolchain — no system clang or gcc.dotnet-hello
dotnet_binary with an auto-downloaded .NET 8 SDK, running a real dotnet publish.kotlin-hello
kotlin_binary and kotlin_library, plus Kotlin linting with kt_lint.java-springboot
A Spring Boot web app:
java_binary, java_test with JUnit 5 auto-included, Maven dependencies, and coverage via rbs coverage.kotlin-springboot
The Spring Boot story in Kotlin — JUnit 5 tests with automatic test dependencies and LCOV coverage.
django-blog
A full Django application on the managed Python toolchain, with pip dependencies resolved by rbs directly.
nodejs-express
An Express server on a hermetic Node.js runtime — npm packages fetched from the registry by rbs, with no npm or yarn CLI involved.
typescript-app
TypeScript compilation with
tsc, paired with an infra.rbs that provisions the app’s cloud infrastructure from the same workspace.proto
Protocol Buffers and gRPC compilation for Java, Kotlin, and Python services.
Web development
- web-vitest — React component testing with the
vitest_testrule: real Vitest execution in a jsdom environment with Testing Library. - mf-enhanced-ssr — the
@module-federation/enhancedruntime with several server-side-rendering options, from automatic SSR to a custom Express server. - web-ssr-custom — developer-controlled SSR where you own the server code, in the style of an Nx monorepo setup.
Testing and coverage
- nodejs-test-coverage —
nodejs_testwith Jest and NYC auto-included, TypeScript test support, and coverage thresholds that fail the target when unmet. - python-test-coverage —
py_testwith pytest and coverage.py auto-included, supporting both pytest and unittest runners, with enforced thresholds. - test-examples — how to test your own custom rules and build-language functions with
rbs rules test, including assertion examples and a workspace-discovery integration test.
The whole platform in one workspace
- platform-demo — one workspace that replaces four tools: a Python dependency graph (build),
py_testwith coverage floors (test),py_lintgates (lint), anoci_imagebuilt from apy_binary(packaging), aci_workflowrunnable locally withrbs ci run(CI), and aninfra.rbs(infrastructure). Read this one to see how the layers compose. - monorepo-ci — a three-service monorepo whose
ci.rbsworkflow applies infrastructure, then builds, tests, and pushes an image per service; adding a service extends the pipeline automatically. - infrastructure — the cloud-agnostic infrastructure SDK: declare compute, networking, and load balancers in
.rbsfiles and drive them withrbs infra plan / apply / destroy. - enhanced-define-rule-demo — writing your own rules with
native.define_rule: custom attributes, implementations, and the SDK-first extension pattern. - stress-parallel — fifty interdependent targets in three layers, useful for watching the parallel scheduler fan out and fan in.
- ddp-tutorial-series — PyTorch training targets: a local
py_binaryrun and anml_training_jobdeclaration for cluster submission.
Cluster job submission (
rbs job, ml_training_job) is an evolving area — the local py_binary targets in ddp-tutorial-series work standalone, but treat the distributed-scheduler flow as experimental.