-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[package] | ||
name = "shared_recording" | ||
version = "0.12.0-alpha.1+dev" | ||
edition = "2021" | ||
rust-version = "1.72" | ||
license = "MIT OR Apache-2.0" | ||
publish = false | ||
|
||
[dependencies] | ||
rerun = { path = "../../../crates/rerun" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: Shared Recording | ||
python: https://github.com/rerun-io/rerun/tree/latest/examples/python/shared_recording/main.py | ||
--- | ||
|
||
<picture> | ||
<img src="https://static.rerun.io/shared_recording/c3da85f1d4c158b8c7afb6bd3278db000b58049d/full.png" alt=""> | ||
<source media="(max-width: 480px)" srcset="https://static.rerun.io/shared_recording/c3da85f1d4c158b8c7afb6bd3278db000b58049d/480w.png"> | ||
<source media="(max-width: 768px)" srcset="https://static.rerun.io/shared_recording/c3da85f1d4c158b8c7afb6bd3278db000b58049d/768w.png"> | ||
<source media="(max-width: 1024px)" srcset="https://static.rerun.io/shared_recording/c3da85f1d4c158b8c7afb6bd3278db000b58049d/1024w.png"> | ||
<source media="(max-width: 1200px)" srcset="https://static.rerun.io/shared_recording/c3da85f1d4c158b8c7afb6bd3278db000b58049d/1200w.png"> | ||
</picture> | ||
|
||
This example demonstrates how to use `RecordingId`s to create a single shared recording across multiple processes. | ||
|
||
Run the following multiple times, and you'll see that each invokation adds data to the existing recording rather than creating a new one: | ||
Check warning on line 16 in examples/rust/shared_recording/README.md GitHub Actions / Spellcheck
|
||
```bash | ||
cargo run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//! Demonstrates how to use `RecordingId`s to build a single recording from multiple processes. | ||
fn main() -> Result<(), Box<dyn std::error::Error>> { | ||
let rec = rerun::RecordingStreamBuilder::new("rerun_example_shared_recording") | ||
.recording_id("my_shared_recording") | ||
.spawn()?; | ||
|
||
rec.log( | ||
"updates", | ||
&rerun::TextLog::new(format!("hello from process #{}", std::process::id())), | ||
)?; | ||
|
||
Ok(()) | ||
} |