RisingWave is a Postgres-compatible streaming database that offers the simplest and most cost-effective way to process, analyze, and manage real-time event data — with built-in support for the Apache Iceberg™ open table format.
RisingWave components are developed in Rust and split into several crates:
config- Default configurations for serversprost- Generated protobuf rust code (grpc and message definitions)stream- Stream compute enginebatch- Batch compute engine for queries against materialized viewsfrontend- SQL query planner and schedulerstorage- Cloud native storage enginemeta- Meta engineutils- Independent util cratescmd- All binaries,cmd_allcontains the all-in-one binaryrisingwaverisedevtool- Developer tool for RisingWave
- Always write code comments in English.
- Write simple, easy-to-read and easy-to-maintain code.
- Use
cargo fmtto format the code if needed. - Follow existing code patterns and conventions in the repository.
You may need to learn how to build and test RisingWave when implementing features or fixing bugs.
- Use
./risedev bto build the project. - Use
./risedev cto check if the code follow rust-clippy rules, coding styles, etc.
- Integration tests and unit tests are valid Rust/Tokio tests, you can locate and run those related in a standard Rust way.
- Parser tests: use
./risedev update-parser-testto regenerate expected output. - Planner tests: use
./risedev run-planner-test [name]to run and./risedev do-apply-planner-test(or./risedev dapt) to update expected output.
- Use
./risedev dto run a RisingWave instance in the background via tmux.- It builds RisingWave binaries if necessary. The build process can take up to 10 minutes, depending on the incremental build results. Use a large timeout for this step, and be patient.
- It kills the previous instance, if exists.
- Optionally pass a profile name (see
risedev.yml) to choose external services or components. By default it usesdefault. - This runs in the background so you do not need a separate terminal.
- You can connect right after the command finishes.
- Logs are written to files in
.risingwave/logfolder.
- Use
./risedev kto stop a RisingWave instance started by./risedev d. - Only when a RisingWave instance is running, you can use
./risedev psql -c "<your query>"to run SQL queries in RW. - Only when a RisingWave instance is running, you can use
./risedev slt './path/to/e2e-test-file.slt'to run end-to-end SLT tests.- File globs like
/**/*.sltis allowed. - Failed run may leave some objects in the database that interfere with next run. Use
./risedev slt-clean ./path/to/e2e-test-file.sltto reset the database before running tests.
- File globs like
- The preferred way to write tests is to write tests in SQLLogicTest format.
- Tests are put in
./e2e_testfolder.
When sandboxing is enabled, these commands need require_escalated because they bind or connect to local TCP sockets:
./risedev dand./risedev p(uses local ports and tmux sockets)./risedev psql ...or directpsql -h localhost -p 4566 ...(local TCP connection)./risedev slt './path/to/e2e-test-file.slt'(connects to local TCP via psql protocol)- Any command that checks running services via local TCP (for example, health checks or custom SQL clients)
See docs/dev/src/connector/intro.md.