[package]
name = "rerun"
authors.workspace = true
categories = ["visualization", "computer-vision"]
description = "Log images, point clouds, etc, and visualize them effortlessly"
edition.workspace = true
homepage.workspace = true
include.workspace = true
keywords = ["mesh", "plotting", "point-cloud", "robotics", "visualization"]
license.workspace = true
publish = true
readme = "README.md"
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lints]
workspace = true

[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]

[features]
default = [
  "analytics",
  "data_loaders",
  "dataframe",
  "demo",
  "glam",
  "image",
  "log",
  "map_view",
  "sdk",
  "server",
]

## Support the `rerun auth` command
auth = ["re_auth/cli", "dep:jiff", "dep:url"]

## Enable anonymized telemetry using our analytics SDK.
analytics = [
  "dep:re_analytics",
  "re_crash_handler?/analytics",
  "re_viewer?/analytics",
  "re_web_viewer_server?/analytics",
]

## Integration with `clap`.
clap = ["dep:clap"]

## Support for using Rerun's data-loaders directly from the SDK.
##
## See our `log_file` example and <https://www.rerun.io/docs/reference/data-loaders/overview>
## for more information.
data_loaders = ["dep:re_mcap", "re_sdk?/data_loaders"]

## Access to Rerun's dataframe API and related types.
dataframe = ["dep:re_dataframe"]

## Demo helpers for examples.
demo = []

## Integration with the [`ecolor`](https://crates.io/crates/ecolor/) crate.
ecolor = ["re_sdk_types?/ecolor"]

## Add support for some math operations using [`glam`](https://crates.io/crates/glam/).
## Only relevant if feature `sdk` is enabled.
glam = ["re_sdk_types?/glam", "re_byte_size/glam"]

## Integration with the [`image`](https://crates.io/crates/image/) crate, plus JPEG support.
image = ["re_sdk_types?/image"]

## Integration with the [`log`](https://crates.io/crates/log/) crate.
log = ["dep:env_filter", "dep:log"]

## Support the map view.
## This adds a lot of extra dependencies.
map_view = ["re_viewer?/map_view"]

## Add support for math type conversions using [`mint`](https://crates.io/crates/mint/).
## Only relevant if feature `sdk` is enabled.
mint = ["re_sdk_types?/mint"]

## Enable faster native video decoding with assembly.
## You need to install [nasm](https://github.com/netwide-assembler/nasm) to compile with this feature.
nasm = ["re_video/nasm"]

## Support spawning a native viewer and allow to extend the viewer.
## This adds a lot of extra dependencies, so only enable this feature if you need it!
native_viewer = ["dep:re_viewer", "dep:re_crash_handler"]

## Enable the in-memory Rerun Server, useful for testing.
oss_server = ["dep:re_server"]

## Enables integration with `re_perf_telemetry` (OpenTelemetry, Jaeger).
##
## This only works on native, and only with `TELEMETRY_ENABLED` set.
perf_telemetry = [
  "dep:re_perf_telemetry",
  "re_redap_client/perf_telemetry",
  "re_viewer?/perf_telemetry",
]

## Enables Tracy profiler integration on top of `perf_telemetry`.
##
## This only works on native.
perf_telemetry_tracy = ["perf_telemetry", "re_perf_telemetry/tracy"]

## Add support for the [`run()`] function, which acts like a main-function for a CLI,
## acting the same as [the `rerun` binary](https://crates.io/crates/rerun-cli).
run = [
  "auth",
  "clap",
  "dep:re_chunk_store",
  "dep:re_crash_handler",
  "dep:re_data_source",
  "re_log_encoding/decoder",
  "re_log_encoding/encoder",
  "sdk",
  "unindent",
]

## Embed the Rerun SDK & built-in types and re-export all of their public symbols.
sdk = ["dep:re_sdk", "dep:re_sdk_types"]

## Support for running a gRPC server that listens to incoming log messages from a Rerun SDK.
server = ["dep:re_grpc_server", "re_sdk/server", "tokio/signal"]

## Support serving a web viewer over HTTP.
##
## Enabling this inflates the binary size quite a bit, since it embeds the viewer wasm.
##
## For faster & easier builds, a pre-built web-views comes bundled with the crate as a Wasm binary.
## Enabling this feature will embed this pre-built web viewer.
##
## However, 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.
web_viewer = ["server", "dep:re_web_viewer_server", "re_sdk?/web_viewer"]


[dependencies]
re_arrow_util.workspace = true
re_build_info.workspace = true
re_byte_size.workspace = true
re_capabilities.workspace = true
re_chunk.workspace = true
re_entity_db.workspace = true
re_error.workspace = true
re_format.workspace = true
re_redap_client.workspace = true
re_log.workspace = true
re_log_encoding.workspace = true
re_log_types.workspace = true
re_memory.workspace = true
re_protos.workspace = true
re_log_channel.workspace = true
re_sorbet.workspace = true
re_tracing.workspace = true
re_uri.workspace = true
re_video.workspace = true

ahash.workspace = true
anyhow.workspace = true
arrow.workspace = true
camino.workspace = true
cfg-if.workspace = true
crossbeam.workspace = true
document-features.workspace = true
indexmap.workspace = true
indicatif.workspace = true
itertools.workspace = true
similar-asserts.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }

# Optional dependencies:
re_analytics = { workspace = true, optional = true }
re_auth = { workspace = true, optional = true }
re_chunk_store = { workspace = true, optional = true }
re_crash_handler = { workspace = true, optional = true }
re_data_source = { workspace = true, optional = true }
re_dataframe = { workspace = true, optional = true }
re_grpc_server = { workspace = true, optional = true }
re_mcap = { workspace = true, optional = true }
re_sdk = { workspace = true, optional = true }
re_server = { workspace = true, optional = true }
re_sdk_types = { workspace = true, optional = true }
re_viewer = { workspace = true, optional = true }
re_web_viewer_server = { workspace = true, optional = true }

env_filter = { workspace = true, optional = true }
log = { workspace = true, optional = true }

# Native dependencies:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
puffin.workspace = true
rayon.workspace = true

# Native, optional:
clap = { workspace = true, optional = true, features = ["derive"] }
jiff = { workspace = true, optional = true }
re_perf_telemetry = { workspace = true, optional = true }
unindent = { workspace = true, optional = true }
url = { workspace = true, optional = true }

[build-dependencies]
re_build_tools.workspace = true


[package.metadata.cargo-shear]
# We only depend on re_video so we can enable extra features for it
ignored = ["re_video", "puffin"]
