sew-proto
sew-proto is the wire contract of Sew, a self-hosted team chat server: the Rust types of every JSON body its HTTP API and realtime gateway send and receive.
Sew is Alakazam Labs' chat server for companies that run their own (channels, threads, direct messages, spaces with roles and permissions, voice channels, search, retention, legal hold). This crate is the one place its wire JSON is defined; the server, its clients and the apps built on it share it.
What it holds:
- ids and chat addresses;
- errors and their codes;
- HTTP request and response bodies, and the route paths;
- gateway frames and events (the realtime websocket);
- change-log kinds, permission bits, organisation policies and audit events;
- the management API bodies;
- the JSON Schema of every type, in
schema/(generated withschemars). - test vectors for the rule that decides whether a person in a call may start or stop a
recording (
recording::controls::decide), invectors/recording-controls-vectors.json: every combination of the facts the rule reads, each with the rule's answer (can_record,can_stop). An implementation of the same rule in another language can check itself against it; the file'sidfield says how each case's id encodes its facts.
The crate is pure: apart from the clock in clock, it does no I/O. Its dependencies are
serde, serde_json and schemars. It has no platform-specific code and works on
Linux, macOS and Windows (Sew's own builds cover Linux and macOS; a compile check covers
Windows).
- Source: https://github.com/Alakazam-211/sew-crates (read-only: it is generated from Sew's repository at each release, so pull requests are not merged there)
- API documentation: https://docs.rs/sew-proto
- Issues: https://github.com/Alakazam-211/sew-crates/issues/new/choose,
with the
sew-protoform, which labels the issuecrate:sew-proto - Security problems: report them privately, as SECURITY.md says.
- MSRV: Rust 1.95.
Usage
[]
= "0.11.4"
= "1" # for the example below
Reading an error answer:
use ;
Features
None: the crate has no Cargo features.
Licence
MIT OR Apache-2.0, at your option. See LICENSE-MIT, LICENSE-APACHE and NOTICE.
Copyright 2026 Alakazam Labs.