Expand description
Rerun - log point clouds, images, etc and visualize them effortlessly
Add the rerun
library to your crate with cargo add rerun
.
There is also a rerun
binary.
The binary is required in order to stream log data
over the networks, and to open our .rrd
data files.
If you need it, install the rerun
binary with cargo install rerun
.
Links
If you get stuck on anything, open an issue at https://github.com/rerun-io/rerun/issues. You can also ask questions on the Rerun Discord.
Using the rerun
library
Logging
let mut rr_session = rerun::Session::init("my_app", true);
let points: Vec<rerun::components::Point3D> = positions();
let colors: Vec<rerun::components::ColorRGBA> = colors();
let image: image::DynamicImage = capture_image();
rerun::MsgSender::new("points")
.with_component(&points)?
.with_component(&colors)?
.send(&mut rr_session)?;
rerun::MsgSender::new("image")
.with_component(&[rerun::components::Tensor::from_image(image)?])?
.send(&mut rr_session)?;
See Session
and MsgSender
for details.
Streaming
To stream log data to an awaiting rerun
process, you can do this:
Start rerun
in a terminal by just running rerun
.
Then do this:
let mut rr_session = rerun::Session::init("my_app", true);
rr_session.connect(rerun::default_server_addr());
Buffering
let mut rr_session = rerun::Session::init("my_app", true);
log_using(&mut rr_session);
rr_session.show();
Binary
The rerun
binary is required in order to stream log data
over the networks, and to open our .rrd
data files.
The binary can act either as a server, a viewer, or both, depending on which options you use when you start it.
cargo install rerun
rerun --help
Feature flags
-
analytics
(enabled by default) — Enable telemetry using our analytics SDK. -
glam
— Add support for some math operations usingglam
. Only relevant if featuresdk
is enabled. -
image
(enabled by default) — Integration with theimage
crate. -
sdk
(enabled by default) — Embed the Rerun SDK and re-export all of its public symbols. -
server
(enabled by default) — Support for running a HTTP server that listens to incoming log messages from a Rerun SDK. -
web
— Support serving a web viewer over HTTP.Enabling this adds quite a bit to the compile time and binary size, since it requires compiling and bundling the viewer as wasm.
You also need to install some additional tools, which you can do by running
scripts/setup_web.sh
.
Modules
components::ViewCoordinates
.Structs
pos
or color
.camera / "left" / points / #42
LogMsg
es).Enums
run
from?MsgSender
.Traits
Component
that is ready to be collected and subsequently serialized
into an Arrow payload.