How joeydd032995-pixel/sharecompute works
ShareCompute combines a native laptop-and-phone model-split worker kit with an InferRing distributed-inference app and a platform-neutral membership core. The active workflow pairs workers, establishes authenticated tunnels, and places model layers across device budgets; the broader repository also includes ring membership/recovery and documented pool and inference simulations. Several app and host subsystems are represented by their exact tree directories because their implementation was not sampled; edges are limited to source references or README statements.
Main entry points: RingCoordinator.swift Ring coordinator · scripts Laptop split host · RingHealthMonitor.swift Ring health · inference_pipeline_hub.py Inference hub
Components 24
Compute workers
- Laptop split host
scripts - Android worker app
Apps/AndroidWorker/app/src/main/java/com/sharecompute/worker/MainActivity.java - Android session
Apps/AndroidWorker/app/src/main/java/com/sharecompute/worker/WorkerSession.java - iOS worker app
Apps/ComputeWorker/Sources/ComputeWorkerApp.swift - iOS worker runtime
Apps/ComputeWorker/Sources/WorkerModel.swift - Native compute worker
native/split/worker.cpp - Worker C API
native/split/worker.h
InferRing app
- Chat experience
Apps/InferRing/InferRing/Screens/Chat - Model orchestration
Apps/InferRing/InferRing/Services/ModelManager.swift - MLX model runtime
Apps/InferRing/Ring/Manager.swift - Bonjour discovery
Apps/InferRing/InferRing/Services/BonjourClient.swift - Ring coordinator
Apps/InferRing/InferRing/Services/RingCoordinator.swift - Ring health
Apps/InferRing/InferRing/Services/RingHealthMonitor.swift - Peer data client
Apps/InferRing/InferRing/Services/DataClient.swift
Membership core
- Membership service
Sources/ShareComputeCore/MembershipService.swift - Device capabilities
Sources/ShareComputeCore/CapabilityProfile.swift - Stage planner
Sources/ShareComputeCore/StagePlanner.swift - Cross-platform pool
Sources/ShareComputeCore/CrossPlatformPool.swift - Ring watchdog
Sources/ShareComputeCore/RingWatchdog.swift
Pool simulations
- Four-platform demo
Sources/FourPlatformDemo/main.swift - Inference hub
scripts/inference_pipeline_hub.py - Inference peer
scripts/inference_pipeline_peer.py - Pipeline protocol
scripts/inference_pipeline_lib.py
Other components
- Operator
Connections 25
- Operator → Laptop split host: starts worker host
README.md - Operator → Android worker app: pairs worker
README.md - Operator → iOS worker app: pairs worker
README.md - Android worker app → Android session: starts session
Apps/AndroidWorker/app/src/main/java/com/sharecompute/worker/MainActivity.java - Android session → Worker C API: queries runtime
Apps/AndroidWorker/app/src/main/java/com/sharecompute/worker/WorkerSession.java - iOS worker app → iOS worker runtime: uses worker model
Apps/ComputeWorker/Sources/ComputeWorkerApp.swift - iOS worker runtime → Worker C API: bridges native API
- Worker C API → Native compute worker: declares interface
native/split/worker.h - Laptop split host → Android session: opens authenticated tunnels
README.md - Laptop split host → iOS worker runtime: opens authenticated tunnels
README.md - Chat experience → Model orchestration: submits chat
- Model orchestration → MLX model runtime: loads model
Apps/InferRing/InferRing/Services/ModelManager.swift - Ring coordinator → Bonjour discovery: manages search
Apps/InferRing/InferRing/Services/RingCoordinator.swift - Ring coordinator → Ring health: coordinates health
Apps/InferRing/InferRing/Services/RingCoordinator.swift - Ring coordinator → Peer data client: uses peer client
Apps/InferRing/InferRing/Services/RingCoordinator.swift - Ring health → Membership service: tracks membership
Apps/InferRing/InferRing/Services/RingHealthMonitor.swift - Ring health → Ring watchdog: monitors generation
Apps/InferRing/InferRing/Services/RingHealthMonitor.swift - Membership service → Device capabilities: records profiles
Sources/ShareComputeCore/MembershipService.swift - Cross-platform pool → Membership service: owns membership
Sources/ShareComputeCore/CrossPlatformPool.swift - Cross-platform pool → Stage planner: plans RAM pool
Sources/ShareComputeCore/CrossPlatformPool.swift - Four-platform demo → Cross-platform pool: connects simulated peers
Sources/FourPlatformDemo/main.swift - Inference hub → Pipeline protocol: uses protocol helpers
scripts/inference_pipeline_hub.py - Inference peer → Pipeline protocol: uses protocol helpers
scripts/inference_pipeline_peer.py - Operator → Inference hub: runs pipeline simulation
README.md - Inference hub → Inference peer: dispatches activation work
README.md