Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Guest Agent (Prototype Skeleton)

Overview

The guest agent runs inside the VM to provide enhanced integration features (clipboard, window enumeration, metrics, snapshots quiesce, etc.).

Planned Tech Stack

  • Language: Rust
  • Runtime: Minimal dependencies; async (tokio) optional later.
  • Build: Cross-compile for aarch64-unknown-linux-gnu and Windows ARM (future).

Responsibilities (Initial Scope)

  1. HELLO handshake + capabilities list.
  2. HEARTBEAT every 5s with minimal metrics (uptime, load if available).
  3. Clipboard request/offer pipeline (text/plain only first).
  4. Window enumeration (Phase B of coherence) — Linux/X11 prototype.

Directory Structure (Planned)

agent/
  Cargo.toml        (to be added)
  src/
    main.rs         (entry point)
    protocol.rs     (frame encode/decode mirroring host)
    clipboard.rs    (feature module)
    windows/        (window enumeration backends)
      x11.rs
      wayland.rs
    metrics.rs

Minimal Pseudocode (Future main.rs)

fn main() -> anyhow::Result<()> {
    let mut conn = VsockConnection::connect(3, 7000)?; // cid=host, port=7000 example
    conn.send_hello()?;
    loop {
        conn.poll()?; // read frames
        // schedule heartbeat
    }
}

Build Notes

  • Will require Rust stable toolchain.
  • Cross target add: rustup target add aarch64-unknown-linux-gnu.
  • Static linking optional (musl) if minimal footprint desired.

Security Considerations

  • Validate all host-originated messages & enforce size constraints.
  • No arbitrary file system access beyond required shared folder paths.

This is a placeholder; implementation to follow in future iteration.