# ravi9733/glue5-android architecture

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

- Interactive diagram: https://gitdiagram.com/ravi9733/glue5-android
- Repository: https://github.com/ravi9733/glue5-android

## Overview

Glue 5 recompiles user-supplied GTA V WebAssembly game code into a native app and supplies the host compatibility layer. The main workflow is app launch and game-file selection, native game execution through runtime imports, and rendering through the GPU backend; users can also stream files, play online, and manage mods through Studio. The graph preserves these documented capabilities and central modules. Some connections are documented at package level; unsampled implementation details are not asserted.

Main entry points: [`crates/glue5/src/app.rs`](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/app.rs) (App and Event Loop), [`crates/glue5-runtime/src/lib.rs`](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/lib.rs) (Host Runtime), [`crates/glue5-gpu/src/pipeline.rs`](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/pipeline.rs) (Render Pipelines), [`crates/glue5-mods/src/engine.rs`](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-mods/src/engine.rs) (Mod Engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_application["App and Event Loop<br/>[app.rs]"]
  node_launcher["Launcher UI<br/>[ui.rs]"]
  node_pages["Home and Settings<br/>[pages.rs]"]
  node_controls["Touch Controls<br/>[touch.rs]"]
  node_settings["App Settings<br/>[settings.rs]"]
  node_paths["Game Paths<br/>[paths.rs]"]
  node_sharing["Game Sharing<br/>[sharing.rs]"]
end

subgraph group_engine["Game Runtime"]
  node_game["Recompiled Game<br/>[lib.rs]"]
  node_runtime["Host Runtime<br/>[lib.rs]"]
  node_memory["WASM Memory<br/>[memory.rs]"]
end

subgraph group_graphics["Graphics"]
  node_gpu["GPU Renderer<br/>[lib.rs]"]
  node_formats["GPU Formats<br/>[format.rs]"]
  node_pipelines["Render Pipelines<br/>[pipeline.rs]"]
  node_shaders["Shader Translation<br/>[shader.rs]"]
end

subgraph group_network["Network and Social"]
  node_stream["File Streaming<br/>[client.rs]"]
  node_catalog["File Catalog<br/>[catalog.rs]"]
  node_friends["Friends Service<br/>[mod.rs]"]
  node_p2p["Peer Networking<br/>[p2p.rs]"]
  node_dht["Peer Discovery<br/>[dht.rs]"]
  node_online["Online Services<br/>[online.rs]"]
end

subgraph group_mods["Mods and Studio"]
  node_mods["Mod Engine<br/>[engine.rs]"]
  node_natives["Game Natives<br/>[natives.rs]"]
  node_studio["Studio IDE<br/>[lib.rs]"]
end

node_user(("Player"))

node_user -->|"launches"| node_application
node_application -->|"shows"| node_launcher
node_launcher -->|"renders"| node_pages
node_application -->|"loads and saves"| node_settings
node_application -->|"resolves game files"| node_paths
node_application -->|"handles input"| node_controls
node_application -->|"starts"| node_game
node_game -->|"uses host imports"| node_runtime
node_runtime -->|"submits rendering"| node_gpu
node_gpu -.->|"executes draws"| node_pipelines
node_pipelines -->|"builds variants"| node_shaders
node_pipelines -->|"uses formats"| node_formats
node_runtime -->|"manages shared memory"| node_memory
node_application -->|"configures streamed files"| node_stream
node_stream -->|"uses file catalog"| node_catalog
node_runtime -->|"provides social features"| node_friends
node_friends -->|"uses peer transport"| node_p2p
node_p2p -->|"uses discovery"| node_dht
node_runtime -->|"provides online support"| node_online
node_runtime -->|"hosts script threads"| node_mods
node_mods -->|"invokes game natives"| node_natives
node_mods -->|"serves IDE"| node_studio

click node_application "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/app.rs"
click node_launcher "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/ui.rs"
click node_pages "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/ui/pages.rs"
click node_controls "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/touch.rs"
click node_settings "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/settings.rs"
click node_paths "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/paths.rs"
click node_sharing "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/sharing.rs"
click node_game "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-game/src/lib.rs"
click node_runtime "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/lib.rs"
click node_memory "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/memory.rs"
click node_gpu "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/lib.rs"
click node_formats "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/format.rs"
click node_pipelines "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/pipeline.rs"
click node_shaders "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/shader.rs"
click node_stream "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-stream/src/client.rs"
click node_catalog "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-stream/src/catalog.rs"
click node_friends "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/friends/mod.rs"
click node_p2p "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/p2p.rs"
click node_dht "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/dht.rs"
click node_online "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/online.rs"
click node_mods "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-mods/src/engine.rs"
click node_natives "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-mods/src/natives.rs"
click node_studio "https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-studio/src/lib.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_application,node_launcher,node_pages,node_controls,node_settings,node_paths,node_sharing toneBlue
class node_game,node_runtime,node_memory toneAmber
class node_gpu,node_formats,node_pipelines,node_shaders toneMint
class node_stream,node_catalog,node_friends,node_p2p,node_dht,node_online toneRose
class node_mods,node_natives,node_studio,node_user toneIndigo
```

## Components

### Application

- [App and Event Loop](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/app.rs): `crates/glue5/src/app.rs`
- [Launcher UI](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/ui.rs): `crates/glue5/src/ui.rs`
- [Home and Settings](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/ui/pages.rs): `crates/glue5/src/ui/pages.rs`
- [Touch Controls](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/touch.rs): `crates/glue5/src/touch.rs`
- [App Settings](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/settings.rs): `crates/glue5/src/settings.rs`
- [Game Paths](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/paths.rs): `crates/glue5/src/paths.rs`
- [Game Sharing](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5/src/sharing.rs): `crates/glue5/src/sharing.rs`

### Game Runtime

- [Recompiled Game](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-game/src/lib.rs): `crates/glue5-game/src/lib.rs`
- [Host Runtime](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/lib.rs): `crates/glue5-runtime/src/lib.rs`
- [WASM Memory](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/memory.rs): `crates/glue5-runtime/src/memory.rs`

### Graphics

- [GPU Renderer](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/lib.rs): `crates/glue5-gpu/src/lib.rs`
- [GPU Formats](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/format.rs): `crates/glue5-gpu/src/format.rs`
- [Render Pipelines](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/pipeline.rs): `crates/glue5-gpu/src/pipeline.rs`
- [Shader Translation](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-gpu/src/shader.rs): `crates/glue5-gpu/src/shader.rs`

### Network and Social

- [File Streaming](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-stream/src/client.rs): `crates/glue5-stream/src/client.rs`
- [File Catalog](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-stream/src/catalog.rs): `crates/glue5-stream/src/catalog.rs`
- [Friends Service](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/friends/mod.rs): `crates/glue5-runtime/src/friends/mod.rs`
- [Peer Networking](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/p2p.rs): `crates/glue5-runtime/src/p2p.rs`
- [Peer Discovery](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/dht.rs): `crates/glue5-runtime/src/dht.rs`
- [Online Services](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-runtime/src/online.rs): `crates/glue5-runtime/src/online.rs`

### Mods and Studio

- [Mod Engine](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-mods/src/engine.rs): `crates/glue5-mods/src/engine.rs`
- [Game Natives](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-mods/src/natives.rs): `crates/glue5-mods/src/natives.rs`
- [Studio IDE](https://github.com/ravi9733/glue5-android/blob/main/crates/glue5-studio/src/lib.rs): `crates/glue5-studio/src/lib.rs`

### Other components

- **Player**

## Connections

- Player → App and Event Loop: launches (evidence: `README.md`)
- App and Event Loop → Launcher UI: shows (evidence: `crates/glue5/src/app.rs`)
- Launcher UI → Home and Settings: renders (evidence: `crates/glue5/src/ui.rs`)
- App and Event Loop → App Settings: loads and saves (evidence: `crates/glue5/src/app.rs`)
- App and Event Loop → Game Paths: resolves game files (evidence: `crates/glue5/src/app.rs`)
- App and Event Loop → Touch Controls: handles input (evidence: `crates/glue5/src/app.rs`)
- App and Event Loop → Recompiled Game: starts (evidence: `README.md`)
- Recompiled Game → Host Runtime: uses host imports (evidence: `README.md`)
- Host Runtime → GPU Renderer: submits rendering (evidence: `README.md`)
- GPU Renderer → Render Pipelines: executes draws (evidence: `crates/glue5-gpu/src/lib.rs`)
- Render Pipelines → Shader Translation: builds variants (evidence: `crates/glue5-gpu/src/pipeline.rs`)
- Render Pipelines → GPU Formats: uses formats (evidence: `crates/glue5-gpu/src/pipeline.rs`)
- Host Runtime → WASM Memory: manages shared memory (evidence: `crates/glue5-runtime/src/lib.rs`)
- App and Event Loop → File Streaming: configures streamed files (evidence: `README.md`)
- File Streaming → File Catalog: uses file catalog (evidence: `crates/glue5-stream/src/client.rs`)
- Host Runtime → Friends Service: provides social features (evidence: `README.md`)
- Friends Service → Peer Networking: uses peer transport (evidence: `crates/glue5-runtime/src/friends/mod.rs`)
- Peer Networking → Peer Discovery: uses discovery (evidence: `crates/glue5-runtime/src/p2p.rs`)
- Host Runtime → Online Services: provides online support (evidence: `README.md`)
- Host Runtime → Mod Engine: hosts script threads (evidence: `README.md`)
- Mod Engine → Game Natives: invokes game natives (evidence: `crates/glue5-mods/src/engine.rs`)
- Mod Engine → Studio IDE: serves IDE (evidence: `README.md`)
