diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 50a2214..e6429bf 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,8 +1,12 @@ [package] name = "butterfly-agent" -version = "0.1.0" +version = "0.2.0" edition = "2021" -description = "Butterfly Desktop Agent — captures display/audio from a VM and forwards HUD commands (mouse/keyboard)" +description = "Butterfly Desktop Agent — captures display from a VM, encodes as H.264/JPEG, streams via WebSocket, receives and executes remote control commands" + +[features] +default = ["h264"] +h264 = ["openh264"] [dependencies] # Async runtime @@ -12,17 +16,20 @@ tokio = { version = "1", features = ["full"] } tokio-tungstenite = { version = "0.24", features = ["connect"] } futures-util = "0.3" -# Screen capture (cross-platform: DXGI on Windows, X11 on Linux, CG on macOS) +# Screen capture (DXGI on Windows, X11 on Linux, CoreGraphics on macOS) scrap = "0.5" -# Input simulation (cross-platform mouse/keyboard injection) +# Input simulation (SendInput on Windows, XTest on Linux, CGEvent on macOS) enigo = "0.2" -# Image encoding (BGRA → JPEG) +# Image encoding (JPEG fallback) image = "0.25" -# Base64 encoding for frame data -base64 = "0.22" +# H.264 encoding (Cisco OpenH264 — software, cross-platform, ~5-15ms encode) +openh264 = { version = "0.6", optional = true } + +# Conditional compilation +cfg-if = "1" # Serialization serde = { version = "1", features = ["derive"] } @@ -44,9 +51,7 @@ anyhow = "1" # HTTP client (for REST API session creation) reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] } -# Audio capture (future use) -# cpal = "0.15" - [profile.release] opt-level = 3 lto = true +codegen-units = 1