Yet Another Protocol
A small peer-to-peer messaging project written in Rust.
YAP is an experiment in building a simple messaging protocol and network stack from scratch, using QUIC for transport.
YAPPPP. I shouldn't do that. ANYWAY.
YAP lets peers connect directly to each other and exchange messages.
The basic idea is:
Alice ───────── Internet ───────── Bob
direct connection
Rather than:
Alice ──> Central server ──> Bob
The project is still under active development, so expect things to break. Spectacularly.
YAP is split into several crates:
yap/
├── yap-protocol/ Protocol and packet definitions
├── yap-core/ Networking and peer management
└── yap-cli/ Command-line client
Defines the data that YAP peers exchange.
This is kept separate from the networking code so that other YAP clients can implement the protocol without needing to use the CLI.
Handles the actual networking.
Currently this is built around:
- Rust
- QUIC
- Quinn
- Tokio
- Serde
The terminal client.
Example:
yap> connect 127.0.0.1:7332
Connecting to 127.0.0.1:7332...
Connected.
yap> yap hello!
YAP is early-stage.
Currently working on:
- Rust workspace
- Separate protocol crate
- Core networking crate
- CLI client
- QUIC connections
- Peer usernames
- Direct messaging
- Chat messages
- JSON packet serialization
- Multiple peers
- Git repository
- Internet-wide peer connections
- NAT traversal
- Peer discovery
- Protocol versioning
- Encryption/identity design
- GUI clients
The long-term goal is for two YAP clients on different networks to communicate directly over the Internet.
You need a recent Rust toolchain.
Clone the repository and run:
cargo checkTo run the CLI:
cargo run -p yap-cliYAP is primarily a learning project.
The goal isn't to reinvent every piece of networking infrastructure on Earth. It's to understand how the pieces fit together by actually building them.
If something is broken:
that's probably part of the development process.
Contributions, experiments, alternative clients, protocol ideas, and particularly GUI clients are welcome.
A GUI client does not need to use the YAP CLI. As long as it speaks the YAP protocol, it can be its own thing.
Apache License 2.0.
YAP.
Yet Another Protocol.
Yet another packet.
Yet another compiler error.
Yet another cargo check.
🦀