> For the complete documentation index, see [llms.txt](https://xrho.gitbook.io/rho/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xrho.gitbook.io/rho/readme.md).

# Introduction

Welcome to the technical documentation for **Rho**.

Rho is a collection of composable networking primitives. Not a framework, not a library with opinions — a set of building blocks that each solve one problem completely, and compose into something much larger.

You can use Rho to build a game server that handles 10,000 concurrent players at 60 Hz. Or you can use it to replace the entire TCP/IP networking stack of a country. Same code, same primitives, different composition.

***

## The Core Layers

1. **Railway** — A shared medium becomes point-to-point connections. Any bus (LoRa, USB, UDP, serial) becomes addressable. Optional per-link encryption. No IP needed.
2. **Tunnel** — An unreliable connection becomes reliable, encrypted, multiplexed, and congestion-controlled. No TCP needed. No TLS needed. No QUIC needed.
3. **Lines** — Entities that can't physically reach each other can communicate. Hierarchical addressing eliminates NAT. Tree routing eliminates BGP. Each node holds \~50 entries regardless of network size.

***

## Design Constraints

Every line of Rho was written under these constraints:

* **No dynamic memory allocation in the hot path.** Buffers are pre-allocated. Carts are stack-allocated.
* **No virtual dispatch.** Callbacks are function pointers and closures, not vtables.
* **No exceptions.** Error handling is via return values and state flags.
* **No threads.** Rho is single-threaded by design. You call `update()` in your loop.
* **No dependencies beyond Xi.** Xi is a lightweight C++ framework providing `Array`, `Map`, `String`, `Func`, and cryptographic primitives.
* **Runs on ESP32.** If it doesn't compile on a microcontroller with 520 KB of RAM, it doesn't ship.

***

## Navigating the Docs

Use the sidebar navigation to explore:

* **Getting Started**
  * [Philosophy](/rho/getting-started/1-introduction/philosophy.md) — The design values behind Rho.
  * [Architecture](/rho/getting-started/1-introduction/architecture.md) — How the protocol layers interact.
  * [Building & Integration](/rho/getting-started/1-introduction/building.md) — How to build Rho.
* **Protocols**
  * [Rho Tunnel](/rho/rho-tunnel/2-tunnel.md) — Reliability, multiplexing, encryption, and congestion control.
  * [Rho Railway](/rho/rho-railway/3-railway.md) — Point-to-point links over raw transports.
  * [Routers](/rho/routers/5-routers.md) — Address routing and tree topologies.
  * [Gateways](/rho/gateways/6-gateways.md) — External boundary mapping and port binding.
  * [Reach](/rho/reach/7-reach.md) — Node discovery and BFT name resolution.
* **Implementation & Tools**
  * [Client & Server](/rho/server-and-client/4-utils.md) — Utilities for standard hosts, game networking, and 0-RTT reconnections.
  * [Daemons](/rho/daemons/8-daemons.md) — The `rhod` node runner and network configuration.
