Skip to content

ivan-amon/xscp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XSCP

Crates.io Docs.rs License: MIT Rust 2024 edition

XSCP Logo

XSCP (XSCP Simple Chat Protocol) is a text-based chat 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 messaging 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.

Repository layout

This repo is a Cargo workspace with three crates:

Crate Description
xscp Protocol primitives: request, response and notification PDUs, with safe constructors and parsers. Transport-agnostic.
client Reference XSCP client.
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

cargo add xscp

See the crate README and API docs for usage examples.

Build everything from source

git clone https://github.com/ivan-amon/xscp.git
cd xscp
cargo build --workspace

Project Status

  • Protocol crate (xscp) with request, response and notification PDUs
  • 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 file for details.


Built by Iván with ❤️ in Rust.

About

XSCP (XSCP Simple Chat Protocol) implementation from scratch in Rust by Iván Amón.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages