Skip to content

Commit 2757b93

Browse files
authored
refactor: move dimos-viewer to dedicated dimos/ directory (#7)
Move all DimOS-specific code out of examples/rust/custom_callback/ into a top-level dimos/ directory. Restore custom_callback to its upstream Rerun state for easier future merges. Directory structure: dimos/ Cargo.toml (dimos-viewer crate) pyproject.toml (maturin packaging) dimos_viewer/ (Python wrapper) tests/ (Python tests) src/ viewer.rs (main binary with CLI args) lib.rs interaction/ (LCM transport module) Changes: - Created dimos/ crate with all viewer + LCM code - Restored examples/rust/custom_callback/ to upstream Rerun state - Updated CI workflow to reference dimos/ instead of custom_callback - Added dimos/ to workspace members - Both crates compile and test independently Verified: - cargo check -p dimos-viewer ✓ - cargo test -p dimos-viewer ✓ (13 tests pass) - cargo check -p custom_callback ✓ (upstream intact) - dimos-viewer --help shows correct CLI args
1 parent 53a36b8 commit 2757b93

File tree

22 files changed

+316
-230
lines changed

22 files changed

+316
-230
lines changed

.github/workflows/build-viewer.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defaults:
3737

3838
env:
3939
PYTHON_VERSION: "3.10"
40-
PACKAGE_DIR: examples/rust/custom_callback
40+
PACKAGE_DIR: dimos
4141

4242
# ---------------------------------------------------------------------------
4343
jobs:
@@ -74,8 +74,8 @@ jobs:
7474
target/
7575
key: ${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.lock') }}
7676

77-
- run: cargo check -p custom_callback
78-
- run: cargo test -p custom_callback
77+
- run: cargo check -p dimos-viewer
78+
- run: cargo test -p dimos-viewer
7979

8080
# -------------------------------------------------------------------
8181
# 2. Build wheels per platform

Cargo.lock

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,6 @@ name = "custom_callback"
22272227
version = "0.30.0-alpha.1+dev"
22282228
dependencies = [
22292229
"bincode",
2230-
"clap",
22312230
"mimalloc",
22322231
"parking_lot",
22332232
"rerun",
@@ -3109,6 +3108,19 @@ dependencies = [
31093108
"subtle",
31103109
]
31113110

3111+
[[package]]
3112+
name = "dimos-viewer"
3113+
version = "0.30.0-alpha.1+dev"
3114+
dependencies = [
3115+
"bincode",
3116+
"clap",
3117+
"mimalloc",
3118+
"parking_lot",
3119+
"rerun",
3120+
"serde",
3121+
"tokio",
3122+
]
3123+
31123124
[[package]]
31133125
name = "directories"
31143126
version = "6.0.0"

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ members = [
77
"crates/utils/*",
88
"crates/viewer/*",
99
"docs/snippets",
10+
"dimos",
1011
"examples/rust/*",
1112
"rerun_py",
1213
"run_wasm",

dimos/Cargo.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[package]
2+
name = "dimos-viewer"
3+
version = "0.30.0-alpha.1+dev"
4+
edition = "2024"
5+
rust-version = "1.92"
6+
license = "MIT OR Apache-2.0"
7+
publish = false
8+
description = "DimOS Interactive Viewer — custom Rerun viewer with LCM click-to-navigate"
9+
10+
[[bin]]
11+
name = "dimos-viewer"
12+
path = "src/viewer.rs"
13+
14+
[lib]
15+
name = "dimos_viewer"
16+
path = "src/lib.rs"
17+
18+
[features]
19+
default = []
20+
analytics = ["rerun/analytics"]
21+
22+
[dependencies]
23+
rerun = { path = "../crates/top/rerun", default-features = false, features = [
24+
"native_viewer",
25+
"run",
26+
"server",
27+
] }
28+
29+
clap = { workspace = true, features = ["derive"] }
30+
bincode.workspace = true
31+
mimalloc.workspace = true
32+
parking_lot.workspace = true
33+
serde = { workspace = true, features = ["derive"] }
34+
tokio = { workspace = true, features = [
35+
"io-util",
36+
"macros",
37+
"net",
38+
"rt-multi-thread",
39+
"signal",
40+
"sync",
41+
"time",
42+
] }

examples/rust/custom_callback/dimos_viewer/__init__.py renamed to dimos/dimos_viewer/__init__.py

File renamed without changes.

examples/rust/custom_callback/dimos_viewer/__main__.py renamed to dimos/dimos_viewer/__main__.py

File renamed without changes.

examples/rust/custom_callback/pyproject.toml renamed to dimos/pyproject.toml

File renamed without changes.

examples/rust/custom_callback/src/interaction/handle.rs renamed to dimos/src/interaction/handle.rs

File renamed without changes.

examples/rust/custom_callback/src/interaction/lcm.rs renamed to dimos/src/interaction/lcm.rs

File renamed without changes.

examples/rust/custom_callback/src/interaction/mod.rs renamed to dimos/src/interaction/mod.rs

File renamed without changes.

0 commit comments

Comments
 (0)