# XSCP
[](https://crates.io/crates/xscp)
[](https://docs.rs/xscp)
[](#license)

<p align="center">
<img src="docs/XSCP.png" alt="XSCP Logo" />
</p>
**XSCP** *(XSCP Stream Communication Protocol)* is a text-based communication protocol. This repository contains its **implementation in Rust**, along with a **client** and a **server**.
## Overview
XSCP defines a minimal client-server architecture for real-time text communication over TCP. The protocol is intentionally simple: clients connect to a server, send messages, and the server broadcasts each message to every connected client. Think IRC, but stripped to its bare bones and written in modern Rust.
PDUs are line-oriented, UTF-8 and pipe-delimited, with a strict **512-byte budget**. The wire format is fully documented in the [`xscp` crate docs](https://docs.rs/xscp).
## Repository layout
This repo is a Cargo workspace with three crates:
| [`xscp`](./src) | Protocol primitives: request, response and notification PDUs, with safe constructors and parsers. Transport-agnostic. |
| [`client`](./client) | Reference XSCP client. |
| [`server`](./server) | Reference XSCP server. |
The `xscp` crate is the only one published; the client and server are reference implementations meant to live alongside the protocol crate in this repository.
## Getting started
### Use the protocol crate in your own project
```sh
cargo add xscp
```
See the [crate README](./README_CRATE.md) and [API docs](https://docs.rs/xscp) for usage examples.
### Build everything from source
```sh
git clone https://github.com/ivan-amon/xscp.git
cd xscp
cargo build --workspace
```
## Project Status
- [x] Protocol crate (`xscp`) with request, response and notification PDUs
- [x] TCP server/client foundation
- [ ] Async I/O Server with Tokio
- [ ] Multi-client broadcast
- [ ] Channels
- [ ] TLS support
## Contributing
Issues and pull requests are welcome. If you want to discuss design changes to the protocol itself, please open an issue first.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Built by Iván with ❤️ in Rust.