Rerun 多模态数据可视化开发环境搭建源码编译与多语言 SDK 完整指南【免费下载链接】rerunVisualize, query, and stream to train on multimodal robotics data.项目地址: https://gitcode.com/GitHub_Trending/re/rerun这篇文章讲 Rerun 开发环境搭建与源码编译的最短路径三系统装齐工具链debug/release 构建 ViewerPython、Rust、C 三条 SDK 链路各配一步。适合熟悉命令行的开发者照做约 1 小时首次全量编译视机器另需 20–40 分钟。操作系统关键步骤预计耗时LinuxUbuntu 20.04系统依赖 → rustup 1.96.0 → pixi ≥0.71.3 →pixi run check-env15–20 分钟macOS11xcode-select → git-lfs → rustupApple Silicon 需核对 aarch64 host→ pixi15–20 分钟Windows10VS 2022 → git lfs → rustup → 确认 git symlink 可用25–30 分钟30 秒看懂 Rerun项目定位与目录结构Rerun 是面向物理 AI 的数据层把多速率、多模态数据图像、点云、变换、时序、视频统一记录、查询、可视化并直接流入训练管线。核心用 Rust 编写基于列式分块存储官方提供 Python、Rust、C 三套 SDKViewer 基于 egui。仓库目录速查目录职责crates/Rust 核心存储层store、Viewer、gRPC 服务、导入器、类型系统rerun_py/Python SDKPyO3 绑定 纯 Python 层rerun_cpp/C SDKCMake 工程examples/Python / Rust / C / C 示例集docs/文档内容与代码片段snippetstests/测试程序与测试资产rrd、mcap、视频等scripts/CI 脚本、lint、快照工具关键文档README.md、ARCHITECTURE.md、CONTRIBUTING.md。三系统统一安装 Rerun 工具链本节完成后你的机器上会有一套版本完全对齐的工具链Rust 1.96.0由仓库rust-toolchain文件锁定、pixi ≥0.71.3pixi.toml中requires-pixi声明、Python 3.11pixi 托管。工具用途建议版本Rust 工具链rustup/cargo编译 Rust 核心与绑定1.96.0仓库锁定Pixi管理开发依赖、编排全部构建任务≥0.71.3PythonPython SDK 构建与运行3.11pixi 托管Git Git LFS拉取仓库与大型测试资产最新稳定版CMake / Ninja / clangC SDK 构建3.27.6 / 1.11.1 / 19.1.7pixi 提供免手装Visual Studio 2022Windows 下 C 工具链仅 Windows 需要克隆仓库含 LFS 资产拉取git clone https://gitcode.com/GitHub_Trending/re/rerun cd rerun git lfs install git lfs pullLinux 安装命令# 系统构建工具与 Git LFS sudo apt update sudo apt install -y build-essential git git-lfs # rustup 仓库锁定的工具链 curl --proto https --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y rustup default 1.96.0 # pixi curl -fsSL https://pixi.sh/install.sh | bashmacOS 安装命令xcode-select --install brew install git git-lfs curl --proto https --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y rustup default 1.96.0 # Apple Silicon确认 host 三元组是 aarch64-apple-darwin rustup set default-host aarch64-apple-darwin curl -fsSL https://pixi.sh/install.sh | bashWindows 在 VS 2022 的 Developer Command Prompt 中执行git lfs install git config --global core.symlinks true rustup install 1.96.0 rustup default 1.96.0Windows 额外注意构建 Web Viewer 依赖符号链接用git config --show-scope --show-origin core.symlinks确认已启用必要时开启 Windows 开发者模式。任务与依赖的完整定义见 pixi.toml。环境自检——一次通过再往下走pixi run check-envRerun 源码编译debug 构建 Viewer 并跑通首个示例本节完成后你能启动一个本地编译的 Rerun Viewer并用三种语言各打出一条日志验证链路。构建并启动 Viewerdebugpixi run rerunrelease 构建可只编译不启动也可边编译边运行pixi run rerun-build-release # 只编译 pixi run rerun-release # 编译并运行产物位置debug 版在target/debug/rerunrelease 版在target/release/rerun。debug 构建下示例程序会自动拉起target/debug/rerun。验证方式一跑仓库内的最小 Python 示例等价于 examples/python/minimal/minimal.py 的内容记录一个 10×10×10 彩色点云pixi run uv run examples/python/minimal/minimal.pyimport numpy as np import rerun as rr rr.init(rerun_example_minimal, spawnTrue) positions np.vstack([xyz.ravel() for xyz in np.mgrid[3 * [slice(-10, 10, 10j)]]]).T colors np.vstack([rgb.ravel() for rgb in np.mgrid[3 * [slice(0, 255, 10j)]]]).astype(np.uint8).T rr.log(my_points, rr.Points3D(positions, colorscolors, radii0.5))验证方式二跑最小 Rust 示例完整源码见 examples/rust/minimal/同一点云场景的 Rust 版use rerun::demo_util::grid; use rerun::external::glam; fn main() - Result(), Boxdyn std::error::Error { let rec rerun::RecordingStreamBuilder::new(rerun_example_minimal).spawn()?; let points grid(glam::Vec3::splat(-10.0), glam::Vec3::splat(10.0), 10); let colors grid(glam::Vec3::ZERO, glam::Vec3::splat(255.0), 10) .map(|v| rerun::Color::from_rgb(v.x as u8, v.y as u8, v.z as u8)); rec.log(my_points, rerun::Points3D::new(points) .with_colors(colors) .with_radii([0.5]))?; Ok(()) }cargo run -p dna # 仓库内任意示例包均可cargo run -p package构建细节feature 组合、Web Viewer、PyO3 配置都写在 BUILD.md 里本文不重复。配置 Rerun Python / Rust / C 多语言开发环境本节完成后三种语言的「安装 → 构建 → 测试」链路全部可复现。Rerun Python SDK 开发环境maturin 构建与 uv 虚拟环境Python 侧采用双环境设计pixi 管 Rust 构建工具uv 管 Python 运行依赖独立.venvpixi run py-build会把开发版rerun-sdk装进 uv 环境。详见 rerun_py/。# 安装外部用户pip install rerun-sdk # 安装源码开发构建开发版并装入 uv 环境 pixi run py-build# 构建可分发 wheel先产出 release 二进制再打轮子 pixi run py-build-wheel pip install ./dist/CURRENT_ARCHITECTURE/*.whl注意py-build-wheel产出的 wheel 不含 Viewer只能用于日志场景BUILD.md 明确标注。# 测试与静态检查 pixi run py-test pixi run py-lintRerun Rust SDK 开发环境cargo 工作区与示例验证# 安装外部用户 cargo add rerun# 构建编译 CLI不含 Web Viewer 的快速路径 pixi run rerun-build# 测试单个 crate 快速回归 cargo test -p re_dataframe # 完整测试矩阵见 [TESTING.md](https://link.gitcode.com/i/75036678156cec95d67d407439f2ca59)# 生成本地 API 文档 cargo doc --all-features --no-deps --openRerun C SDK 开发环境pixi cpp 环境与 CMakeC 构建在独立的 pixicpp环境中进行默认环境不含它避免在 Linux 上破坏 client 编译除 Windows 需系统级 VS 2022 外其余依赖全部由 pixi 下载。源码与构建说明见 rerun_cpp/。# 安装pixi 自动解析 cpp 环境依赖无需手装 pixi install -e cpp# 构建全部 C 产物CMake Ninja产物在 build/debug pixi run -e cpp cpp-build-all# 测试 pixi run -e cpp cpp-testRerun 编译加速与 IDE 调试工具箱本节完成后你的反复编译时间显著下降且能在 IDE 里断点调试 Viewer 和 C 代码。构建加速Cranelift 快速档与自定义 linker最省事的一档仓库内置 Cranelift 后端 profile专为快速迭代设计rustup component add rustc-codegen-cranelift-preview --toolchain nightly pixi run rerun-build-fast # 编译 viewer 到 target/dev-fast pixi run rerun-fast # 直接运行Rerun 在 debug 和 release 下均静态链接自定义 linker split debuginfo 是收益最大的两个开关配置写入~/.cargo/config.toml。Linux 示例mold[target.x86_64-unknown-linux-gnu] linker clang rustflags [ -C, link-arg-fuse-ld/usr/bin/mold, -C, split-debuginfounpacked, ]macOSIntel 用 zld、Apple Silicon 仅split-debuginfounpacked与 Windowsrust-lld.exesplit-debuginfopacked的完整配置见 BUILD.md 的 Improving compile times 一节。IDE 调试配置VS Code 断点跑 Viewer 与 CRust 侧推荐插件rust-analyzer、CodeLLDB。为 debug 版 Viewer 添加启动配置.vscode/launch.json{ version: 0.2.0, configurations: [ { name: Rerun Viewer (debug), type: lldb, request: launch, program: ${workspaceFolder}/target/debug/rerun, cwd: ${workspaceFolder} } ] }C 侧无需额外配置cpp-prepare任务已开启CMAKE_EXPORT_COMPILE_COMMANDSON把compile_commands.json导出到build/debugclangd 与 VS Code IntelliSense 可直接消费。任务速查表命令功能pixi run check-env环境自检pixi run rerun/rerun-releasedebug / release 编译并启动 Viewerpixi run rerun-build-release只编译 release 版pixi run rerun-fastCranelift 快速档编译运行pixi run rerun-web构建并运行 Web 版 Viewerwasmpixi run py-build/py-testPython SDK 构建 / 测试pixi run py-build-wheel打 Python wheelpixi run -e cpp cpp-build-all/cpp-testC 构建 / 测试pixi run fmt全语言格式化pixi run lint-rerun仓库级 lintpixi task list查看全部任务Rerun 开发环境常见问题排错速查表典型报错原因一行解决命令failed to open PyO3 config file .../rerun_py/pyo3-build.cfg绕过 pixi 直接跑 cargoPyO3 配置未生成pixi run ensure-pyo3-build-cfgerror: invalid channel name [toolchain]rustup 过旧读不懂新版 rust-toolchain 文件rustup self updateApple Silicon 上rustc -vV显示 x86_64 host工具链装错架构rustup set default-host aarch64-apple-darwin rustup install 1.96.0Windows 构建 Web Viewer 报 symlink 相关错误git 客户端未启用符号链接git config --global core.symlinks truenasmfeature 构建失败或视频解码性能差nasm CLI 不在 PATHsudo apt install nasm按发行版换包管理器linker cc not found缺系统编译器sudo apt install build-essential首次 debug 编译久到怀疑死机静态链接 全量 debuginfo属正常现象改用pixi run rerun-fast或配置 mold/zldRerun 延伸阅读与贡献入口继续深入按此顺序仓库内文档docs/concepts、howto、reference 全量在线化内容代码片段索引docs/snippets/INDEX.md所有 snippet 可直接编译运行多语言示例集examples/Python / Rust / C / C 各有 minimal 起步Rust API 文档本地生成cargo doc --all-features --no-deps --open测试体系TESTING.md编译全貌BUILD.md贡献入口读 CONTRIBUTING.md 了解 Trunk-Based 分支策略与 PR 规范读 CODE_STYLE.md 对齐代码风格推送前可手动执行bash scripts/pre-push.sh跑一遍仓库自带的 pre-push 检查入口在hooks/pre-push。工具链装齐、Viewer 跑起来、三条 SDK 链路验证通过你的 Rerun 开发环境就完整可用了——接下来直接去examples/里挑一个示例改起来。【免费下载链接】rerunVisualize, query, and stream to train on multimodal robotics data.项目地址: https://gitcode.com/GitHub_Trending/re/rerun创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考