# fxgl/steamac architecture

> Architecture diagram of the GitHub repository fxgl/steamac, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fxgl/steamac
- Repository: https://github.com/fxgl/steamac

## Overview

FX Steam Launcher is a macOS front end for running Valve’s signed SteamOS image in a Hypervisor.framework VM on Apple Silicon. The main user journey is to create a disk from Valve’s image, boot SteamOS, then launch games through Steam/Proton/FEX with GPU rendering routed through Vulkan to Metal. The graph also preserves documented sharing, input, audio, streaming, reporting, and update capabilities. Some subsystem links are documented in the README rather than verified in sampled implementation; those edges cite the README.

Main entry points: [`host/launcher/Sources/steamac-vm/main.swift`](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/main.swift) (Launcher app), [`guest/progress-agent/src/port.rs`](https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/port.rs) (Progress channel), [`host/launcher/Sources/steamac-vm/DiskCreator.swift`](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/DiskCreator.swift) (Disk creation), [`guest`](https://github.com/fxgl/steamac/tree/main/guest) (Steam and games)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_host["macOS Launcher"]
  node_launcher["Launcher app<br/>[main.swift]"]
  node_disk["Disk creation<br/>[DiskCreator.swift]"]
  node_vm["VM runtime<br/>[VM.swift]"]
end

subgraph group_guest["SteamOS Guest"]
  node_steam["Steam and games"]
  node_agent["Guest session agent<br/>[main.rs]"]
  node_guestpad["Guest gamepad<br/>[pad.rs]"]
  node_guestclip["Guest clipboard<br/>[clipboard.rs]"]
  node_guestlogs["Guest log bundle<br/>[collect.rs]"]
end

subgraph group_graphics["Graphics Path"]
  node_venus["Guest Vulkan"]
  node_virtio["Virtio GPU"]
  node_metalvk["Vulkan drivers"]
end

subgraph group_sharing["Host Guest Features"]
  node_progress["Progress channel<br/>[port.rs]"]
  node_controllers["Controller input<br/>[Gamepad.swift]"]
  node_clipboard["Shared clipboard<br/>[Clipboard.swift]"]
  node_audio["Audio<br/>[SoundControl.swift]"]
  node_stream["Streaming"]
end

subgraph group_services["Support Services"]
  node_reports["Problem reports"]
  node_updates["Launcher updates<br/>[UpdateCheck.swift]"]
  node_stats["Game statistics<br/>[index.js]"]
end

node_user(("Mac user"))
node_valve["Valve image service"]
node_metal["Apple Metal"]

node_user -->|"launches"| node_launcher
node_user -->|"creates disk"| node_disk
node_disk -->|"downloads image"| node_valve
node_disk -->|"boots from"| node_vm
node_launcher -->|"starts VM"| node_vm
node_vm -->|"runs guest"| node_steam
node_steam -->|"renders games"| node_venus
node_venus -->|"sends graphics"| node_virtio
node_virtio -->|"forwards Vulkan"| node_metalvk
node_metalvk -->|"uses"| node_metal
node_steam -.->|"runs alongside"| node_agent
node_agent -->|"reports status"| node_progress
node_launcher -->|"reads commands"| node_progress
node_controllers -->|"passes input"| node_guestpad
node_launcher -->|"captures input"| node_controllers
node_clipboard -->|"shares clipboard"| node_guestclip
node_launcher -->|"provides sound"| node_audio
node_launcher -->|"supports streaming"| node_stream
node_user -->|"requests report"| node_reports
node_reports -->|"requests logs"| node_progress
node_progress -->|"transfers logs"| node_guestlogs
node_launcher -->|"checks updates"| node_updates
node_user -->|"rates games"| node_stats

click node_launcher "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/main.swift"
click node_disk "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/DiskCreator.swift"
click node_vm "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/VM.swift"
click node_steam "https://github.com/fxgl/steamac/tree/main/guest"
click node_agent "https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/main.rs"
click node_progress "https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/port.rs"
click node_venus "https://github.com/fxgl/steamac/tree/main/guest/mesa"
click node_virtio "https://github.com/fxgl/steamac/tree/main/host/virglrenderer"
click node_metalvk "https://github.com/fxgl/steamac/tree/main/host/moltenvk"
click node_controllers "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/Gamepad.swift"
click node_guestpad "https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/pad.rs"
click node_clipboard "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/Clipboard.swift"
click node_guestclip "https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/clipboard.rs"
click node_audio "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/SoundControl.swift"
click node_stream "https://github.com/fxgl/steamac/tree/main/host/launcher/Sources/steamac-vm/Stream"
click node_reports "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/CrashReporting.swift"
click node_guestlogs "https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/collect.rs"
click node_updates "https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/UpdateCheck.swift"
click node_stats "https://github.com/fxgl/steamac/blob/main/services/game-stats/src/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher,node_disk,node_vm,node_user toneBlue
class node_steam,node_agent,node_guestpad,node_guestclip,node_guestlogs toneAmber
class node_venus,node_virtio,node_metalvk toneMint
class node_progress,node_controllers,node_clipboard,node_audio,node_stream toneRose
class node_reports,node_updates,node_stats,node_valve,node_metal toneIndigo
```

## Components

### macOS Launcher

- [Launcher app](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/main.swift): `host/launcher/Sources/steamac-vm/main.swift`
- [Disk creation](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/DiskCreator.swift): `host/launcher/Sources/steamac-vm/DiskCreator.swift`
- [VM runtime](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/VM.swift): `host/launcher/Sources/steamac-vm/VM.swift`

### SteamOS Guest

- [Steam and games](https://github.com/fxgl/steamac/tree/main/guest): `guest`
- [Guest session agent](https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/main.rs): `guest/progress-agent/src/main.rs`
- [Guest gamepad](https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/pad.rs): `guest/progress-agent/src/pad.rs`
- [Guest clipboard](https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/clipboard.rs): `guest/progress-agent/src/clipboard.rs`
- [Guest log bundle](https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/collect.rs): `guest/progress-agent/src/collect.rs`

### Graphics Path

- [Guest Vulkan](https://github.com/fxgl/steamac/tree/main/guest/mesa): `guest/mesa`
- [Virtio GPU](https://github.com/fxgl/steamac/tree/main/host/virglrenderer): `host/virglrenderer`
- [Vulkan drivers](https://github.com/fxgl/steamac/tree/main/host/moltenvk): `host/moltenvk`

### Host Guest Features

- [Progress channel](https://github.com/fxgl/steamac/blob/main/guest/progress-agent/src/port.rs): `guest/progress-agent/src/port.rs`
- [Controller input](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/Gamepad.swift): `host/launcher/Sources/steamac-vm/Gamepad.swift`
- [Shared clipboard](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/Clipboard.swift): `host/launcher/Sources/steamac-vm/Clipboard.swift`
- [Audio](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/SoundControl.swift): `host/launcher/Sources/steamac-vm/SoundControl.swift`
- [Streaming](https://github.com/fxgl/steamac/tree/main/host/launcher/Sources/steamac-vm/Stream): `host/launcher/Sources/steamac-vm/Stream`

### Support Services

- [Problem reports](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/CrashReporting.swift): `host/launcher/Sources/steamac-vm/CrashReporting.swift`
- [Launcher updates](https://github.com/fxgl/steamac/blob/main/host/launcher/Sources/steamac-vm/UpdateCheck.swift): `host/launcher/Sources/steamac-vm/UpdateCheck.swift`
- [Game statistics](https://github.com/fxgl/steamac/blob/main/services/game-stats/src/index.js): `services/game-stats/src/index.js`

### Other components

- **Mac user**
- **Valve image service**
- **Apple Metal**

## Connections

- Mac user → Launcher app: launches (evidence: `README.md`)
- Mac user → Disk creation: creates disk (evidence: `README.md`)
- Disk creation → Valve image service: downloads image (evidence: `README.md`)
- Disk creation → VM runtime: boots from (evidence: `README.md`)
- Launcher app → VM runtime: starts VM (evidence: `host/launcher/Sources/steamac-vm/main.swift`)
- VM runtime → Steam and games: runs guest (evidence: `README.md`)
- Steam and games → Guest Vulkan: renders games (evidence: `README.md`)
- Guest Vulkan → Virtio GPU: sends graphics (evidence: `README.md`)
- Virtio GPU → Vulkan drivers: forwards Vulkan (evidence: `README.md`)
- Vulkan drivers → Apple Metal: uses (evidence: `README.md`)
- Steam and games → Guest session agent: runs alongside (evidence: `guest/progress-agent/src/main.rs`)
- Guest session agent → Progress channel: reports status (evidence: `guest/progress-agent/src/main.rs`)
- Launcher app → Progress channel: reads commands (evidence: `host/launcher/Sources/steamac-vm/main.swift`)
- Controller input → Guest gamepad: passes input (evidence: `README.md`)
- Launcher app → Controller input: captures input (evidence: `README.md`)
- Shared clipboard → Guest clipboard: shares clipboard (evidence: `README.md`)
- Launcher app → Audio: provides sound (evidence: `README.md`)
- Launcher app → Streaming: supports streaming (evidence: `README.md`)
- Mac user → Problem reports: requests report (evidence: `README.md`)
- Problem reports → Progress channel: requests logs
- Progress channel → Guest log bundle: transfers logs (evidence: `guest/progress-agent/src/collect.rs`)
- Launcher app → Launcher updates: checks updates (evidence: `host/launcher/Sources/steamac-vm/main.swift`)
- Mac user → Game statistics: rates games (evidence: `README.md`)
