How rerun-io/rerun works
Project type and purpose
• Rerun is an open-source, multimodal data-logging and visualization toolchain. It provides language-specific SDKs (Rust, Python, C++, JS), a CLI, a networked viewer (native & web), a file-based recording format (RRD), and query APIs.
• It’s neither a single standalone app nor a classic front-end/back-end web service; it’s a modular toolkit that spans clients, libraries, storage, services, and interactive viewers.
Top-level components
a. SDK clients (language bindings)
• rerun_py (Python)
• rerun_cpp (C++)
• rerun (Rust CLI & SDK)
• rerun_js (TypeScript/JS bindings & web viewer)
b. Core crates (“crates/store”, “crates/build”, “crates/utils”)
• Serialization & binary or protobuf encoding
• Chunked store & file sink (RRD)
• Dataframe query, loader, and store abstractions
• Code-generation tools (re_types_builder, re_protos_builder)
c. Data path & storage
• Streaming to disk: ci snapshot “.rrd” format via re_log_encoding & re_chunk_store
• In-memory store & query engine via re_entity_db, re_dataframe, re_datafusion
d. Transport & services
• gRPC server and client (crates/store/re_grpc_server, re_grpc_client)
• Binary stream sink over TCP/Unix socket (“spawn()” API)
e. CLI
• rerun-cli (top/rerun-cli) for launching viewer, recording, file operations, migration, verification
f. Viewer
• Native Rust viewer (crates/viewer/re_viewer & companion crates for panels, UI, context, renderer)
• Web viewer (rerun_js/web-viewer) loaded via WASM or remote gRPC
Relationships & data flow
1. Application code imports SDK →
2. SDK marshals logs to a RecordingStream →
3a. Direct to viewer process via IPC/gRPC or spawn()
3b. To file sink (RRD) on disk → later replay
4. Viewer process ingests logs via re_viewer_context →
5. Query & store context builds in-memory state →
6. re_renderer draws primitives →
7. UI crates (re_time_panel, re_selection_panel, re_blueprint_tree, etc.) compose panels, menus, interactions
Architectural patterns & principles
• Modular crates by concern: build-time codegen, runtime store, rendering, UI, utilities
• Client-server decoupling: SDK ↔ Viewer over well-defined protocols (binary, gRPC)
• Plug-in-style UI: each view type (2D, 3D, graph, dataframe, map, text) is a separate crate
• Layered design: serialization layer → storage layer → query layer → rendering layer → application/UI layer
Technologies & frameworks
• Rust cargo workspace with many sub-crates
• FlatBuffers & Protobuf codegen for type definitions
• wgpu / WebGPU via re_renderer for cross-platform GPU
• clap for CLI parsing
• gRPC via tonic (server & client)
• WASM for web viewer
• Node.js & rollup scripts in rerun_js
Essential architectural elements
• SDK clients and language boundaries
• RecordingStream (binary & Protobuf)
• re_log_encoding & re_chunk_store (file sink)
• gRPC server & client
• In-memory store & query engine
• Viewer process & UI modules
• Renderer and GPU abstraction
• Build-time codegen crates
• CLI entrypoint