# Building a Decentralized Mesh Network in Rust: GhostWire

> Source: <https://dev.to/phantomojo/building-a-decentralized-mesh-network-in-rust-ghostwire-2ff3>
> Published: 2026-10-15 16:45:51+00:00

GhostWire is an open protocol and reference implementation for resilient peer-to-peer communication. It is built in Rust with libp2p, XChaCha20-Poly1305, X25519/ML-KEM hybrid post-quantum key exchange, delay-tolerant networking, and AI-assisted routing.

Most communication systems assume a working internet, centralized servers, and stable identities. GhostWire assumes the opposite: intermittent connectivity, untrusted infrastructure, and real physical threats. It is built for disaster responders, rural communities, privacy advocates, and developers who need communication that still works when the normal stack fails.

```
Application: messaging, knowledge ark, ghost channels
API: REST, WebSocket, CLI, TUI
Services: block store, mailbox, social, Sphinx
AI routing: LightGBM -> Gemma 4 -> GNN -> PRoPHET
Crypto: XChaCha20-Poly1305, X25519, ML-KEM-768
Transports: TCP, WebRTC, BLE, LoRa, obfs4, Reticulum
Mesh: libp2p GossipSub, Kademlia DHT, DTN
git clone https://codeberg.org/PHANTOMOJO/GhostWire-secure-mesh-communication.git
cd GhostWire-secure-mesh-communication/ghostwire
cargo run --release
```

The node starts on `http://127.0.0.1:8080`. Mesh networking activates with `--mesh-port`.

GhostWire is a protocol, not just an app. Use it as a Rust crate, REST API, or implement the spec in another language.

Read the spec: `docs/spec/`

GitHub/Codeberg: [https://codeberg.org/PHANTOMOJO/GhostWire-secure-mesh-communication](https://codeberg.org/PHANTOMOJO/GhostWire-secure-mesh-communication)

Website: [https://www.ghostwire.cc/](https://www.ghostwire.cc/)

We welcome code, tests, docs, security review, and field testing. Good first issues and help-wanted labels are being prepared now. If you work on mesh networking, privacy, DTN, or Rust crypto, your review would help.
