# meehl/rusty-path-of-building architecture

> Architecture diagram of the GitHub repository meehl/rusty-path-of-building, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/meehl/rusty-path-of-building
- Repository: https://github.com/meehl/rusty-path-of-building

## Overview

Rusty Path of Building is a native runtime for Path of Building 1 and 2. The user selects a game at launch; the app opens either the installer or the PoB runtime, which runs the game’s Lua scripts and presents their interactive interface. The runtime bridges Lua callbacks and APIs to window, input, clipboard, text, and rendering facilities. The README also documents automatic asset updates and platform support. The graph preserves documented product capabilities, but some subsystem links are omitted where the sampled source does not establish the call path.

Main entry points: [`src/pob/api.rs`](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api.rs) (Lua API registration), [`src/app.rs`](https://github.com/meehl/rusty-path-of-building/blob/main/src/app.rs) (Application lifecycle), [`src/pob.rs`](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob.rs) (PoB runtime), [`src/renderer.rs`](https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer.rs) (Renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_cli["Command-line launch<br/>[main.rs]"]
  node_app["Application lifecycle<br/>[app.rs]"]
  node_installer["Asset installer<br/>[installer.rs]"]
  node_downloader["GitHub downloads<br/>[download.rs]"]
end

subgraph group_pob["PoB and Lua"]
  node_pob_runtime["PoB runtime<br/>[pob.rs]"]
  node_lua_api["Lua API registration<br/>[api.rs]"]
  node_lua_callbacks["Lua callbacks<br/>[callback.rs]"]
  node_lua_render["Lua rendering API<br/>[rendering.rs]"]
  node_lua_text["Lua text API<br/>[text.rs]"]
  node_lua_images["Lua image handles<br/>[image_handle.rs]"]
  node_lua_search["Lua file search<br/>[search_handle.rs]"]
  node_subscripts["Lua subscripts<br/>[subscript.rs]"]
end

subgraph group_graphics["Graphics and text"]
  node_graphics_context["Graphics context<br/>[gfx.rs]"]
  node_renderer["Renderer<br/>[renderer.rs]"]
  node_image_data["Image processing<br/>[image.rs]"]
  node_textures["Texture registry<br/>[textures.rs]"]
  node_fonts["Font system<br/>[fonts.rs]"]
  node_font_atlas["Glyph atlas<br/>[atlas.rs]"]
end

subgraph group_platform["Platform services"]
  node_window["Window integration<br/>[window.rs]"]
  node_input["Input handling<br/>[input.rs]"]
  node_clipboard["Clipboard<br/>[clipboard.rs]"]
  node_worker_pool["Image worker pool<br/>[worker_pool.rs]"]
end

node_user(("User"))

node_user -->|"launches"| node_cli
node_cli -->|"creates"| node_app
node_app -->|"starts runtime"| node_pob_runtime
node_app -->|"starts installer"| node_installer
node_installer -->|"downloads with"| node_downloader
node_pob_runtime -->|"registers"| node_lua_api
node_pob_runtime -->|"manages"| node_subscripts
node_lua_api -->|"registers"| node_lua_callbacks
node_lua_api -->|"registers"| node_lua_render
node_lua_api -->|"registers"| node_lua_text
node_lua_api -->|"registers"| node_lua_images
node_lua_api -->|"registers"| node_lua_search
node_app -->|"creates"| node_graphics_context
node_graphics_context -->|"renders with"| node_renderer
node_renderer -->|"uses"| node_image_data
node_renderer -->|"uses"| node_textures
node_textures -->|"loads"| node_image_data
node_textures -->|"dispatches loads"| node_worker_pool
node_fonts -->|"uses"| node_font_atlas

click node_cli "https://github.com/meehl/rusty-path-of-building/blob/main/src/main.rs"
click node_app "https://github.com/meehl/rusty-path-of-building/blob/main/src/app.rs"
click node_installer "https://github.com/meehl/rusty-path-of-building/blob/main/src/installer.rs"
click node_downloader "https://github.com/meehl/rusty-path-of-building/blob/main/src/installer/download.rs"
click node_pob_runtime "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob.rs"
click node_lua_api "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api.rs"
click node_lua_callbacks "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/callback.rs"
click node_lua_render "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/rendering.rs"
click node_lua_text "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/text.rs"
click node_lua_images "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/image_handle.rs"
click node_lua_search "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/search_handle.rs"
click node_subscripts "https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/subscript.rs"
click node_graphics_context "https://github.com/meehl/rusty-path-of-building/blob/main/src/gfx.rs"
click node_renderer "https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer.rs"
click node_image_data "https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer/image.rs"
click node_textures "https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer/textures.rs"
click node_fonts "https://github.com/meehl/rusty-path-of-building/blob/main/src/fonts.rs"
click node_font_atlas "https://github.com/meehl/rusty-path-of-building/blob/main/src/fonts/atlas.rs"
click node_window "https://github.com/meehl/rusty-path-of-building/blob/main/src/window.rs"
click node_input "https://github.com/meehl/rusty-path-of-building/blob/main/src/input.rs"
click node_clipboard "https://github.com/meehl/rusty-path-of-building/blob/main/src/clipboard.rs"
click node_worker_pool "https://github.com/meehl/rusty-path-of-building/blob/main/src/worker_pool.rs"

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_cli,node_app,node_installer,node_downloader,node_user toneBlue
class node_pob_runtime,node_lua_api,node_lua_callbacks,node_lua_render,node_lua_text,node_lua_images,node_lua_search,node_subscripts toneAmber
class node_graphics_context,node_renderer,node_image_data,node_textures,node_fonts,node_font_atlas toneMint
class node_window,node_input,node_clipboard,node_worker_pool toneRose
```

## Components

### Application runtime

- [Command-line launch](https://github.com/meehl/rusty-path-of-building/blob/main/src/main.rs): `src/main.rs`
- [Application lifecycle](https://github.com/meehl/rusty-path-of-building/blob/main/src/app.rs): `src/app.rs`
- [Asset installer](https://github.com/meehl/rusty-path-of-building/blob/main/src/installer.rs): `src/installer.rs`
- [GitHub downloads](https://github.com/meehl/rusty-path-of-building/blob/main/src/installer/download.rs): `src/installer/download.rs`

### PoB and Lua

- [PoB runtime](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob.rs): `src/pob.rs`
- [Lua API registration](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api.rs): `src/pob/api.rs`
- [Lua callbacks](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/callback.rs): `src/pob/api/callback.rs`
- [Lua rendering API](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/rendering.rs): `src/pob/api/rendering.rs`
- [Lua text API](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/text.rs): `src/pob/api/text.rs`
- [Lua image handles](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/image_handle.rs): `src/pob/api/image_handle.rs`
- [Lua file search](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/api/search_handle.rs): `src/pob/api/search_handle.rs`
- [Lua subscripts](https://github.com/meehl/rusty-path-of-building/blob/main/src/pob/subscript.rs): `src/pob/subscript.rs`

### Graphics and text

- [Graphics context](https://github.com/meehl/rusty-path-of-building/blob/main/src/gfx.rs): `src/gfx.rs`
- [Renderer](https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer.rs): `src/renderer.rs`
- [Image processing](https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer/image.rs): `src/renderer/image.rs`
- [Texture registry](https://github.com/meehl/rusty-path-of-building/blob/main/src/renderer/textures.rs): `src/renderer/textures.rs`
- [Font system](https://github.com/meehl/rusty-path-of-building/blob/main/src/fonts.rs): `src/fonts.rs`
- [Glyph atlas](https://github.com/meehl/rusty-path-of-building/blob/main/src/fonts/atlas.rs): `src/fonts/atlas.rs`

### Platform services

- [Window integration](https://github.com/meehl/rusty-path-of-building/blob/main/src/window.rs): `src/window.rs`
- [Input handling](https://github.com/meehl/rusty-path-of-building/blob/main/src/input.rs): `src/input.rs`
- [Clipboard](https://github.com/meehl/rusty-path-of-building/blob/main/src/clipboard.rs): `src/clipboard.rs`
- [Image worker pool](https://github.com/meehl/rusty-path-of-building/blob/main/src/worker_pool.rs): `src/worker_pool.rs`

### Other components

- **User**

## Connections

- User → Command-line launch: launches (evidence: `README.md`)
- Command-line launch → Application lifecycle: creates (evidence: `src/main.rs`)
- Application lifecycle → PoB runtime: starts runtime (evidence: `src/app.rs`)
- Application lifecycle → Asset installer: starts installer (evidence: `src/app.rs`)
- Asset installer → GitHub downloads: downloads with (evidence: `src/installer.rs`)
- PoB runtime → Lua API registration: registers (evidence: `src/pob.rs`)
- PoB runtime → Lua subscripts: manages (evidence: `src/pob.rs`)
- Lua API registration → Lua callbacks: registers (evidence: `src/pob/api.rs`)
- Lua API registration → Lua rendering API: registers (evidence: `src/pob/api.rs`)
- Lua API registration → Lua text API: registers (evidence: `src/pob/api.rs`)
- Lua API registration → Lua image handles: registers (evidence: `src/pob/api.rs`)
- Lua API registration → Lua file search: registers (evidence: `src/pob/api.rs`)
- Application lifecycle → Graphics context: creates (evidence: `src/app.rs`)
- Graphics context → Renderer: renders with (evidence: `src/renderer.rs`)
- Renderer → Image processing: uses (evidence: `src/renderer.rs`)
- Renderer → Texture registry: uses (evidence: `src/renderer.rs`)
- Texture registry → Image processing: loads (evidence: `src/renderer/textures.rs`)
- Texture registry → Image worker pool: dispatches loads (evidence: `src/renderer/textures.rs`)
- Font system → Glyph atlas: uses (evidence: `src/fonts.rs`)
