Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Environment:Risingwavelabs Risingwave Rust Build Environment

From Leeroopedia


Knowledge Sources
Domains Infrastructure, Build_System
Last Updated 2026-02-09 08:00 GMT

Overview

Ubuntu 24.04 build environment with Rust nightly-2025-10-10 (edition 2024), protobuf compiler, CMake, LLD linker, and SIMD-specific compiler flags for x86_64 (AVX2) and aarch64 (NEON) targets.

Description

This environment provides the complete build toolchain for compiling RisingWave from source. It is based on Ubuntu 24.04 and requires the Rust nightly channel (pinned to nightly-2025-10-10) with the 2024 edition. The build requires system-level packages including protobuf compiler for gRPC code generation, CMake for native dependencies, LLD as the linker, and OpenSSL/SASL development headers. SIMD instructions are mandatory: x86_64 targets require AVX2, and aarch64 targets require NEON via target-specific rustflags in .cargo/config.toml.

Usage

Use this environment for building RisingWave from source, running unit tests, or contributing to the Rust codebase. It is the mandatory prerequisite for all Rust-based implementations including the frontend SQL planner, stream engine, batch engine, storage engine, and meta service.

System Requirements

Category Requirement Notes
OS Ubuntu 24.04 LTS (or macOS) Kernel 5.15+ recommended for Linux
Hardware x86_64 with AVX2 or aarch64 with NEON SIMD instructions required by rustflags
Disk 50GB+ SSD Incremental builds can be large; sccache recommended
RAM 16GB+ recommended Linking is memory-intensive with LLD

Dependencies

System Packages (Debian/Ubuntu)

  • make, build-essential
  • cmake
  • protobuf-compiler (protoc)
  • curl
  • lld (LLVM linker)
  • pkg-config
  • libssl-dev
  • libsasl2-dev
  • libblas-dev, liblapack-dev, libomp-dev
  • postgresql-client (for psql connectivity)
  • tmux (for risedev background processes)
  • parallel
  • openjdk-17-jdk (for Java connector JNI builds)
  • maven (for Java components)

System Packages (macOS)

  • postgresql, cmake, protobuf, tmux
  • cyrus-sasl, lld, openssl@3, libomp, parallel

Rust Toolchain

  • Rust channel: nightly-2025-10-10
  • Edition: 2024
  • Cargo features: profile-rustflags
  • Resolver: 2

Cargo Tools

  • cargo-make >= 0.37.24
  • cargo-nextest (test runner)
  • cargo-sort (dependency sorting)
  • cargo-machete (unused dependency checker)
  • cargo-llvm-cov (code coverage)
  • sccache >= 0.10.0 (build caching)
  • sqllogictest-bin >= 0.29.0 (e2e SLT tests)
  • buf v1.29.0 (protobuf schema management)

Credentials

No credentials are required for building. Runtime credentials (cloud storage, etc.) are documented in the Docker Deployment Environment.

Quick Install

# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y make build-essential cmake \
  protobuf-compiler curl lld pkg-config libssl-dev libsasl2-dev \
  libblas-dev liblapack-dev libomp-dev postgresql-client tmux parallel \
  openjdk-17-jdk maven

# Install Rust nightly
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup install nightly-2025-10-10
rustup default nightly-2025-10-10

# Install cargo tools
cargo install cargo-make@0.37.24 cargo-nextest sccache@0.10.0 sqllogictest-bin@0.29.0

Code Evidence

Rust toolchain pinning from ci/rust-toolchain line 7:

channel = "nightly-2025-10-10"

SIMD target flags from .cargo/config.toml lines 7-17:

[target.x86_64-unknown-linux-gnu]
rustflags = ["-Ctarget-feature=+avx2"]

[target.aarch64-unknown-linux-gnu]
rustflags = ["-Ctarget-feature=+neon"]

[target.x86_64-apple-darwin]
rustflags = ["-Ctarget-feature=+sse4.2", "-Clink-arg=-fuse-ld=lld"]

Cargo-make minimum version from Makefile.toml line 145:

min_version = "0.37.24"

Edition and workspace configuration from Cargo.toml lines 79-83:

resolver = "2"
edition = "2024"
version = "2.9.0-alpha"

Common Errors

Error Message Cause Solution
error: no override and no default toolchain set Rust nightly not installed rustup install nightly-2025-10-10 && rustup default nightly-2025-10-10
error: linker 'lld' not found LLD linker not installed sudo apt-get install lld
protoc not found protobuf-compiler missing sudo apt-get install protobuf-compiler
LLVM ERROR: target does not support AVX2 Running on CPU without AVX2 Use aarch64 build or remove AVX2 flag from .cargo/config.toml
error: cargo-make version mismatch cargo-make too old cargo install cargo-make@0.37.24

Compatibility Notes

  • macOS: Uses LLD via -Clink-arg=-fuse-ld=lld on x86_64 and aarch64. Requires Homebrew packages instead of apt.
  • aarch64 Linux: Uses NEON SIMD instead of AVX2. Fully supported as a build target.
  • Nix: A develop/nix/devshell.nix is provided with all dependencies pre-configured for Nix users.
  • Docker CI: The CI uses a pre-built Docker image (rw-build-env) with all dependencies baked in. See ci/build-ci-image.sh.
  • Python UDF Support: Requires Python 3.12 with development headers and PYO3_PYTHON=python3.12 environment variable.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment