rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Minimize logging SDK dependencies to improve compile times

Open emilk opened this issue 1 year ago • 1 comments

We want to lower the threshold for someone to use rerun or re_sdk to just log data to a file, and then open that file in app.rerun.io. That includes minimizing the amount of dependencies one has to build. If someone does cargo add rerun and sees 200 dependencies being pulled in, they may very well abort.

So: to use the SDK to only log to a file should be possible with a minimal set of dependencies; mostly just Arrow.

In the future we could add support for the native viewer streaming and .rrd file that is being written to by the SDK, thus still supporting spawn even without WebSockets:

  • https://github.com/rerun-io/rerun/issues/4056

cargo tree -p rerun -e normal is good tool for working on this, as is cargo build --timings -p rerun --no-default-features

emilk avatar Jan 11 '24 14:01 emilk

cargo clean && cargo build --timings -p rerun --no-default-features produces this:

image

What the hell is egui doing there? (fix: https://github.com/rerun-io/rerun/pull/5099)

And wasm-bindgen for a native build makes no sense either.

emilk avatar Feb 07 '24 15:02 emilk

One important crate to focus on is re_sdk.

cargo tree -p re_sdk reveals some deps that should be removed:

  • serde
  • env_logger
  • backtrace
  • fixed
  • num-derive
  • comfy-table
  • similar-asserts
  • time
  • re_memory

build-deps:

  • cargo_metadata
  • sha2
  • walkdir

emilk avatar May 20 '24 18:05 emilk