Skip to content

feat: Rerun-compatible CLI args for seamless spawn integration#6

Merged
spomichter merged 1 commit intomainfrom
feat/cli-args
Mar 4, 2026
Merged

feat: Rerun-compatible CLI args for seamless spawn integration#6
spomichter merged 1 commit intomainfrom
feat/cli-args

Conversation

@spomichter
Copy link

Summary

Add clap CLI argument parsing to dimos-viewer so it accepts the same flags that rerun_bindings.spawn() passes to the stock rerun binary.

Motivation

Currently the DimOS bridge uses rr.spawn() which finds and launches the rerun binary with specific CLI args (--port, --memory-limit, --expect-data-soon, etc). To seamlessly swap in our custom viewer, it needs to accept these same args.

With this change, the DimOS bridge can do:

import rerun_bindings
rerun_bindings.spawn(executable_name='dimos-viewer', port=9877)

No rerun-sdk fork needed. No manual pre-launch. Same seamless experience as stock Rerun.

Changes

  • Added clap dependency to custom_callback/Cargo.toml
  • Added Args struct with Rerun-compatible CLI flags:
    • --port (default 9877, vs stock Rerun's 9876)
    • --memory-limit (default 75%)
    • --server-memory-limit (default 1GiB)
    • --hide-welcome-screen
    • --expect-data-soon
  • gRPC server now binds to the port from --port arg instead of hardcoded 9877

Testing

  • cargo check passes
  • --help shows all expected flags
  • Verified exact args from rr.spawn(): --port=9877 --memory-limit=75% --server-memory-limit=1GiB --expect-data-soon parse correctly

Integration (DimOS side)

After this merges, the DimOS Rerun bridge (bridge.py) needs a ~3-line change:

# Instead of: rr.spawn(connect=True)
import rerun_bindings
rerun_bindings.spawn(executable_name='dimos-viewer', port=9877)
rr.connect_grpc('rerun+http://127.0.0.1:9877/proxy')

Add clap CLI argument parsing to dimos-viewer so it accepts the same
flags that rerun_bindings.spawn() passes to the stock rerun binary:

  --port (default 9877)
  --memory-limit (default 75%)
  --server-memory-limit (default 1GiB)
  --hide-welcome-screen
  --expect-data-soon

This enables seamless integration with the Rerun SDK:

  import rerun_bindings
  rerun_bindings.spawn(executable_name='dimos-viewer', port=9877)

No need to fork rerun-sdk or pre-launch the viewer manually.
The DimOS bridge can call rerun_bindings.spawn() directly with
our binary name as a drop-in replacement.
@spomichter spomichter merged commit 53a36b8 into main Mar 4, 2026
29 of 37 checks passed
@spomichter spomichter deleted the feat/cli-args branch March 4, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant