Skip to content

feat: StreamCloud — Rust port of LingBot-Map (streaming 3D reconstruction)#612

Draft
ruvnet wants to merge 5 commits into
mainfrom
claude/lingbot-map-rust-port-k5bcfz
Draft

feat: StreamCloud — Rust port of LingBot-Map (streaming 3D reconstruction)#612
ruvnet wants to merge 5 commits into
mainfrom
claude/lingbot-map-rust-port-k5bcfz

Conversation

@ruvnet

@ruvnet ruvnet commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Summary

StreamCloud is a standalone Rust port of LingBot-Map (robbyant/lingbot-map, Apache-2.0, arXiv:2604.14141) — a feed-forward, streaming 3D reconstruction foundation model. Self-contained workspace at streamcloud-rs/, excluded from the root build, splittable into its own repo.

The headline architectural change: the FlashInfer paged KV cache (VRAM-bound, forgets past a sliding window) is replaced by a lock-free HNSW trajectory memory backed by ruvector-coreO(log N) long-range drift correction with no VRAM ceiling.

Status: complete (P0–P9, all ADRs)

Crate What it does
streamcloud-memory StreamingMemory over the real ruvector-core VectorDB API (KV-cache → HNSW). Long-range recall verified at 5000 frames.
streamcloud-tensor ModelConfig + header-only safetensors WeightIndex + candle weight loaders.
streamcloud-model SyntheticReconstructor (pure-Rust, wasm-safe, default) + candle GeometricContextTransformer (loads safetensors).
streamcloud-io FrameSink, PNG export, streaming H.264 MP4 (openh264mp4; round-trips through the reader as a valid AVC track).
streamcloud-pipeline Streaming loop (encode → retrieve top-K anchors → reconstruct → store) + CPU orbit renderer + synthetic scene.
streamcloud-cli Native demo (streamcloud render → PNG + MP4, streamcloud inspect).
streamcloud-wasm + demo/ wasm-bindgen StreamCloudDemo + WebGPU point-cloud renderer (2D fallback); static site.

Demos

  • Native: cargo run -p streamcloud-cli --release -- render --frames 60 --out out.mp4 --png-dir frames → streaming MP4 + PNG sequence + final still (orbiting camera shows real 3D parallax).
  • Web: WebGPU/WASM site in demo/, deployed by .github/workflows/streamcloud-pages.yml (path-filtered + manual dispatch).

Verification (all green): cargo fmt --check, cargo clippy --workspace -D warnings, 25 native tests + 8 candle tests, wasm32-unknown-unknown release build. CI: .github/workflows/build-streamcloud.yml.

Honest scope notes

  • "Standalone repo" = self-contained streamcloud-rs/ directory (write access is scoped to ruvnet/ruvector); structured to split out cleanly.
  • The 4.63 GB checkpoint is borrowed at runtime (never committed). A deterministic synthetic backend (ADR-0006) drives the full pipeline + demos without the weights; the candle real-weights path is wired and compiles but is not validated against the actual checkpoint (a multi-week effort, out of sandbox scope).

Attribution

StreamCloud is an independent reimplementation crediting upstream LingBot-Map throughout (HF + arXiv links, Apache-2.0 LICENSE retained). Model weights remain the original authors' property under their license.

ADRs

0001 topology · 0002 ruvector memory · 0003 candle/safetensors · 0004 wgpu+WebGPU/Pages · 0005 MP4/PNG · 0006 synthetic fallback & provenance.

🤖 Generated with claude-flow

claude and others added 5 commits June 27, 2026 02:41
Add a self-contained Cargo workspace porting LingBot-Map (robbyant/lingbot-map,
Apache-2.0) — a streaming feed-forward 3D reconstruction model — to Rust.

Foundation (P0-P2, builds + tests green):
- lingbot-memory: StreamingMemory over the real ruvector-core VectorDB API,
  replacing the FlashInfer paged KV cache with lock-free HNSW retrieval
  (O(log N) long-range drift correction, no VRAM ceiling). Long-range recall
  verified at 5000-frame range.
- lingbot-tensor: ModelConfig (serde from config.json) + header-only
  safetensors WeightIndex (validate multi-GB checkpoints without loading them);
  candle weight materialization behind a feature flag.
- ADR-0001..0005: workspace topology, ruvector memory layer, candle/safetensors
  backend, wgpu+WebGPU/WASM rendering & GitHub Pages deploy, MP4/PNG output.
- PROGRESS.md: loop-state tracker driving the iterative build-out.
- .cargo/config.toml: sparse crates.io protocol for sandboxed/offline builds.

Excluded from the root workspace so it never perturbs the parent build and can
be split into its own repo unchanged.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016aHCtJGcejmWbzX2PXKtLH
…aming MP4

- lingbot-model: shared types (Frame/Point/PointCloud/KeyframeFeatures) and the
  Reconstructor trait. SyntheticReconstructor (pure-Rust, wasm-safe, default):
  monocular depth -> pinhole projection -> colored point cloud, with anchor
  context folded in as drift correction. candle GeometricContextTransformer
  (feature-gated) loads safetensors; both backends compile and are tested.
- lingbot-io: FrameSink trait + PngSequenceSink + streaming Mp4Sink (openh264
  H.264 encode -> mp4 mux). Output MP4 round-trips through the mp4 reader as a
  valid single AVC track; PNG export verified.
- ADR-0006: synthetic-fallback strategy & checkpoint provenance.

Tests green: lingbot-model (6) + lingbot-io (3), candle backend builds clean.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016aHCtJGcejmWbzX2PXKtLH
- lingbot-pipeline: StreamingReconstructor wiring model + memory + io. Per frame:
  encode -> memory.retrieve_context(top_k) -> reconstruct(frame, anchors) ->
  insert_keyframe (the ADR-0002 KV-cache replacement). CPU orbit SoftwareRenderer
  (z-buffered point-cloud rasterizer showing real 3D parallax) + deterministic
  synthetic scene source. 5 tests pass.
- lingbot-cli (bin `lingbot`): `render` runs the stream and exports a streaming
  MP4 + optional PNG sequence + final still; `inspect` reads a safetensors
  checkpoint header. Verified end-to-end: 480x360 MP4 + 48 PNG frames generated.
- Reconstructor trait split into encode/reconstruct so anchors are retrieved
  between them; ModelConfig re-exported from lingbot-model.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016aHCtJGcejmWbzX2PXKtLH
… port complete

- lingbot-wasm: wasm-bindgen LingbotDemo exposing the streaming pipeline to JS;
  portable brute-force cosine anchor retrieval (native keeps ruvector HNSW).
  Cross-compiles to wasm32 (~500 KB).
- demo/: WebGPU point-cloud renderer (2D canvas fallback) + static site loading
  the wasm-pack bundle; live stats (frame/points/anchors/keyframes).
- .github/workflows/lingbot-pages.yml: build wasm-pack bundle + deploy demo/ to
  GitHub Pages (workflow_dispatch + path-filtered).
- .github/workflows/build-lingbot.yml: workspace CI (fmt + clippy -D warnings +
  test + candle build + wasm build).
- lingbot-tensor/load.rs: candle safetensors materialization helpers.
- scene generator moved into lingbot-model (shared by native pipeline + wasm).
- README/PROGRESS finalized; fmt + clippy clean.

Verified: cargo fmt --check, clippy -D warnings, 25 native tests + 8 candle
tests, wasm32 release build — all green. Native CLI produced a real MP4 + PNGs.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016aHCtJGcejmWbzX2PXKtLH
Full rename of the standalone port:
- directory lingbot-map-rs/ → streamcloud-rs/
- crates lingbot-{memory,tensor,model,io,pipeline,cli,wasm} → streamcloud-*
- binary `lingbot` → `streamcloud`; wasm export LingbotDemo → StreamCloudDemo
- workflows → streamcloud-pages.yml / build-streamcloud.yml; root workspace
  `exclude` updated to streamcloud-rs
- READMEs, ADRs, demo UI and all branding now read "StreamCloud"

Upstream attribution retained throughout: StreamCloud is described as a Rust
port of LingBot-Map (robbyant/lingbot-map, Apache-2.0), with HF/arXiv links and
the Apache-2.0 LICENSE kept for compliance.

Verified after rename: cargo fmt --check, clippy -D warnings, full test suite
(25 native + candle), wasm32 release build, and the renamed `streamcloud` binary
all green.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_016aHCtJGcejmWbzX2PXKtLH
@ruvnet ruvnet changed the title feat: Standalone Rust port of LingBot-Map (streaming 3D reconstruction) feat: StreamCloud — Rust port of LingBot-Map (streaming 3D reconstruction) Jun 27, 2026
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.

2 participants