rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Add `serve` function to C++ API

Open emilk opened this issue 1 year ago • 2 comments

RecordingStream has connect and spawn, but no serve.

emilk avatar Jan 02 '24 15:01 emilk

  • Related: https://github.com/rerun-io/rerun/issues/1998

emilk avatar Jan 15 '24 12:01 emilk

This would imply dragging in a lot of stuff to rerun_c, meaning we should make this opt-in. But having two rerun_c artifacts seems a bit cumbersome. Not a 'quick issue' in that case then anymore

Wumpf avatar Feb 19 '24 11:02 Wumpf

(via discussion with @jleibs:) Alternatively to embedding the wasm blobs in the SDK (both in C++ and Python!) we could instead let the rerun cli do the work. We'd start rerun in serve mode and then connect to the serving rerun. This has a bunch of advantages over the approach we're taking today in Python (and should probably abandon there as well!):

  • this removes a complicated dependency from all SDKs
  • continues the trend of having the SDK relatively lean & friendly for local compilation and the Viewer relatively large (more meant as binary distribution)
    • ship the wasm blobs only once instead of twice!
  • moves us towards a hub-like behavior
  • very little new code and entirely isolated to the C++ sdk (don't need to touch C)

Reportedly, this already works as is!

obvious drawback is that we have another tcp loopback indirection. In the future we could do shared memory based interprocess communication, but it this very unlikely to become an issue all that soon.

Wumpf avatar Sep 09 '24 14:09 Wumpf