Cargo Features

[dependencies]
rerun-cli = { version = "0.20.3", default-features = false, features = ["release", "nasm", "native_viewer", "map_view", "grpc", "web_viewer"] }
default release? = map_view, native_viewer, web_viewer

The default is what the user gets when they call cargo install rerun-cli --locked, so we have all the bells and wistles here, except those that may require extra tools (like "nasm"). That is: cargo install rerun-cli --locked should work for everyone.

release = default, nasm

!!!IMPORTANT!!!

Do you really want to add features in release that are not in default?

Here are some reasons not to:

  • These features will be missing from the cargo install rerun-cli command our users will inevitably use.
  • These features will not be picked up in places where we cannot use the release feature set (e.g. rerun_js).
  • This list is not exhaustive and will unexpectedly grow in the future.

If you insist on adding a feature here, please make sure you address all the concerns above.

nasm

This requires external build tools (the nasm cli) and would break any build on a system without it. Mitigation: a warning with instructions is printed when building rerun-cli in release mode without the nasm feature (see build.rs).

The features we enable when we build the pre-built binaries during our releases. This may enable features that require extra build tools that not everyone has.

nasm release?

Enable faster native video decoding with assembly. You need to install nasm to compile with this feature.

Enables nasm of rerun

native_viewer default

Support spawning a native viewer.
This adds a lot of extra dependencies, so only enable this feature if you need it!

Enables native_viewer of rerun

map_view default

Support the map view.
This adds a lot of extra dependencies.

Enables map_view of rerun

grpc

Enable the gRPC Rerun Data Platform data source.

Enables tokio, grpc of rerun

web_viewer default

Support serving a web viewer over HTTP.

Enabling this inflates the binary size quite a bit, since it embeds the viewer wasm.
When building from source (in the repository), this feature adds quite a bit to the compile time since it requires compiling and bundling the viewer as wasm.

TODO(#4295): web_viewer shouldn't require rerun/sdk

Enables sdk and web_viewer of rerun