Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions core/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,39 @@ This directory contains the Rust screen capture and remote control engine (`hopp
## Conventions & Structure

- Platform-specific modules live in `src/**/{linux,macos,windows}.rs`.
- Platform modules use `#[cfg_attr(target_os = "macos", path = "macos.rs")] mod platform;` to conditionally select the platform file at compile time.
- Core subsystems: `capture/`, `graphics/`, `input/`, `room_service/`.
- Logging uses `env_logger`; set `RUST_LOG=hopp_core=info` (use `debug` only when needed).

## Architecture Overview

- Screen-sharing and remote-control engine: one user **shares** their screen, others **control** it remotely.
- Launched as a child process by a Tauri app; communicates with it via IPC socket (`socket_lib`).
- Main event loop is driven by `winit`; rendering uses `wgpu`.
- `RoomService` runs an async Tokio runtime managing a LiveKit/WebRTC room for media and data channels.
- Two roles: **Sharer** (captures screen, forwards remote input) and **Controller** (renders remote frames, sends input).
- CLI args: `--textures-path`, `--sentry-dsn`, `--socket-path`.

## Supporting Crates

- `socket_lib` — IPC layer between the Tauri app and the core process (Unix sockets on macOS/Linux, TCP on Windows). Defines all message types exchanged between the two processes.
- `sentry_utils` — Error reporting and telemetry via Sentry.

## Key Types

- `Application` — central state struct, owns all subsystems.
- `RenderEventLoop` — wraps the `winit` event loop and drives rendering.
- `UserEvent` — enum of all events flowing through the system (socket messages, room events, UI actions).
- `RemoteControl` — active session state holding graphics and input controllers.
- `RoomService` — manages the LiveKit/WebRTC room on an async Tokio runtime.

## Related Docs

- `README.md` for architecture and diagrams.
- `tests/README.md` for test setup and commands (manual only).

## Plan Mode

- Make the plan extremely concise. Sacrifice grammar for the sake of concision.
- At the end of each plan, give me a list of unresolved questions to answer, if any.

2 changes: 2 additions & 0 deletions core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ fontdb = "0.23.0"
arboard = "3.6.1"
iced_winit = "0.14.0"
iced_wgpu = "0.14.0"
iced = { version = "0.14.0", features = ["canvas", "image"] }
iced = { version = "0.14.0", features = ["canvas", "image", "svg"] }
iced_core = "0.14.0"
Loading