Implementation:Risingwavelabs Risingwave Makefile Task Runner
| Knowledge Sources | |
|---|---|
| Domains | Build, DeveloperTooling, CI |
| Last Updated | 2026-02-09 07:00 GMT |
Overview
Central cargo-make task runner configuration (Makefile.toml) that orchestrates building, testing, checking, and managing the RisingWave development environment through composable tasks.
Description
The Makefile.toml defines over 80 tasks for the RisingWave project using the cargo-make build tool. Tasks cover building Rust components, running unit and integration tests, linting (clippy, fmt, typos, hakari, dep-sort, machete), running SQLLogicTest suites, managing the risedev development cluster lifecycle (start, stop, restart, kill), deterministic simulation testing, code coverage, and CI workflows. The file extends additional task definitions from sub-crate Makefile.toml files (e.g., grafana, prometheus, minio, connector, planner_test).
Usage
All tasks are invoked through the ./risedev wrapper script, which delegates to cargo make. Common aliases include b (build), c (check), d (dev cluster start), k (kill), p (playground), and slt (SQLLogicTest).
Code Reference
Source Location
- Repository: risingwave
- File: Makefile.toml
- Lines: L1-1649
Signature
# Primary developer commands via risedev wrapper
./risedev b # Build RisingWave binaries
./risedev c # Run pre-CI checks (fmt, clippy, typos, etc.)
./risedev d # Start dev cluster
./risedev k # Kill dev cluster
./risedev p # Start playground (all-in-one)
./risedev slt # Run SQLLogicTest files
./risedev test # Run unit tests
Import
# Requires cargo-make to be installed
cargo install cargo-make
# Then use the risedev wrapper
./risedev <task-name>
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| ENABLE_BUILD_RUST | Environment variable | No | Controls whether Rust build tasks execute |
| ENABLE_RELEASE_PROFILE | Environment variable | No | When set, builds with release profile |
| ENABLE_SANITIZER | Environment variable | No | Enables thread sanitizer in builds |
| ENABLE_DYNAMIC_LINKING | Environment variable | No | Toggles dynamic vs static linking |
| RISINGWAVE_BUILD_PROFILE | Environment variable | No | Build profile name (dev, release, production) |
| USE_SYSTEM_RISINGWAVE | Environment variable | No | Skip building and use system-installed binary |
Outputs
| Name | Type | Description |
|---|---|---|
| target/{profile}/risingwave | Binary | All-in-one RisingWave binary |
| target/debug/risedev-dev | Binary | RiseDev cluster manager binary |
| .risingwave/ | Directory | Runtime data, logs, and config for dev cluster |
Key Task Categories
Build Tasks:
- build-risingwave (alias: b, build) -- Builds risingwave_cmd_all and risedev crates
- build-risingwave-playground -- Builds the playground binary
- sbuild -- Builds in deterministic simulation mode
- build-connector-node -- Builds Java connector node via Maven
Check Tasks:
- check (alias: c) -- Runs all pre-CI checks: fmt, clippy, dep-sort, typos, machete, trailing spaces
- check-fix (alias: cf) -- Same as check but also auto-fixes clippy warnings
- check-fast -- Subset of checks that are fast to run (excludes clippy)
Test Tasks:
- test -- Runs unit tests with cargo-nextest
- test-cov -- Runs unit tests with code coverage reporting
- stest -- Unit tests in deterministic simulation mode
- sit-test -- Integration tests in deterministic simulation mode
- slt -- Runs SQLLogicTest files against a running RisingWave instance
Cluster Management Tasks:
- dev (alias: d) -- Starts a full dev cluster using risedev-dev
- playground (alias: p) -- Starts a lightweight all-in-one playground
- kill-risedev (alias: k) -- Stops the running dev cluster
- down -- Kill cluster and clean all data
- restart -- Restart a specific node in the cluster
- psql -- Connect to the running RisingWave instance via psql
CI Tasks:
- ci-start -- Clean start for CI environments
- ci-kill -- Kill cluster and verify logs for CI
- check-logs -- Scans logs for panics and excessive duplication
Usage Examples
Typical Development Workflow
# Build the project
./risedev b
# Run pre-CI checks before committing
./risedev c
# Start a dev cluster
./risedev d
# Run SQL tests against the running cluster
./risedev slt './e2e_test/streaming/**/*.slt'
# Connect via psql
./risedev psql -c "SELECT 1;"
# Stop the cluster
./risedev k
Running Simulation Tests
# Build in simulation mode
./risedev sbuild
# Run simulation unit tests
./risedev stest
# Run simulation integration tests
./risedev sit-test
# Run simulation e2e tests
./risedev sslt -- --run './e2e_test/my_test.slt'
Related Pages
Implements Principle
Related Implementations
- Implementation:Risingwavelabs_Risingwave_Cargo_Workspace_Configuration -- Workspace config consumed by build tasks
- Implementation:Risingwavelabs_Risingwave_Risedev_Configuration -- Service profiles used by cluster management tasks
- Implementation:Risingwavelabs_Risingwave_SLT_Coverage_Checker -- Validates test coverage of SLT files run by CI tasks