Celerity is a pure Rust implementation of ZMTP 3.1 built around a sans-IO core. The protocol engine stays as a state machine, while the Tokio layer handles TCP and Unix domain socket transport for practical use.
The project is aimed at people who want a small, direct Rust messaging stack without pulling in a C library or hiding the wire protocol behind too much magic.
- ZMTP 3.1 greeting, handshake, framing, and multipart message handling
- Sans-IO
CelerityPeercore - Tokio transport wrappers for TCP and IPC on Unix
PUB/SUBandREQ/REPhelpers- CURVE-RS encrypted transport mode for non-local links
cel-catCLI for quick local testing
cargo buildcargo install --path . --features cli --bin cel-catcargo test --all-featurestokio: enables the Tokio transport layercli: builds thecel-catutilityipc: enables Unix domain socket supportcurve: enables CURVE-RS security
For day-to-day local testing, --all-features is the simplest path.
Terminal 1:
cargo run --all-features --bin cel-cat -- sub 127.0.0.1:5555Terminal 2:
cargo run --all-features --bin cel-cat -- pub 127.0.0.1:5555 hello from tcpThis is still TCP. It is the right transport when your host machine and a VM need to talk over a real IP address on the same LAN, bridged adapter, or host-only network.
Example with the host publishing and the VM subscribing:
On your host Mac:
cargo run --all-features --bin cel-cat -- pub 0.0.0.0:5555 hello from hostOn your Kali VM:
cargo run --all-features --bin cel-cat -- sub <HOST-IP>:5555Example with the VM publishing and the host subscribing:
On your Kali VM:
cargo run --all-features --bin cel-cat -- pub 0.0.0.0:5555 hello from kaliOn your host Mac:
cargo run --all-features --bin cel-cat -- sub <VM-IP>:5555ipc:// uses Unix domain sockets, so both processes must run on the same machine.
Terminal 1:
cargo run --all-features --bin cel-cat -- sub ipc:///tmp/celerity.sockTerminal 2:
cargo run --all-features --bin cel-cat -- pub ipc:///tmp/celerity.sock hello from ipccel-cat pub accepts trailing words as one message, so this works as expected:
cargo run --all-features --bin cel-cat -- pub 127.0.0.1:5555 hello there world127.0.0.1 and localhost are treated as local links. That means NULL security is allowed by default for quick development and local testing.
IPC is local-only. It does not travel over Wi-Fi, Ethernet, or between separate VMs. It is the fastest and simplest option when both processes live on the same host.
For non-loopback TCP, the intended path is CURVE-RS. The library defaults to failing closed for remote NULL unless you explicitly opt into insecure mode.
The high-level CLI is meant for local workflows first. For remote hosts, use the library API with an explicit SecurityConfig::curve() setup and managed key material.
That means host-to-VM traffic over a real IP is TCP, but it is no longer treated as a local loopback link. If you want that path to be secure and reliable beyond local experiments, use CURVE-RS through the library API rather than relying on plain NULL.
Add the crate with the feature set you need:
[dependencies]
celerity = { version = "0.1.0", features = ["tokio", "ipc", "curve"] }At the core is CelerityPeer, which owns protocol state but no sockets. The Tokio wrappers in celerity::io sit on top when you want real network transport.
Format and test before pushing:
cargo fmt
cargo test
cargo test --all-featuresFor the initial release:
git tag -a v0.1.0 -m "Initial release with IPC and CURVE"
git push origin v0.1.0Licensed under:
- MIT