Crates

Overview#

The waymux repository is organized as a single Cargo workspace containing all Rust crates, plus one Go module. The workspace file is the root Cargo.toml; every crate version is pinned to the workspace version and shares a common edition, license, and MSRV.

Most crates are internal implementation details: the binaries are not published to crates.io and have no stability guarantee as library surfaces. Two crates, waymux-protocol and waymux-mux-mkv, are designed as reusable libraries and are the crates.io publish targets. If you are integrating with waymux from Rust, depend only on those two.

All crates#

Rust binaries

Crate Binary Purpose
waymux-cli waymux The user-facing CLI: 23 subcommands that drive the daemon over a local Unix socket or a remote HTTPS transport. The canonical control surface for humans and agents alike.
waymux-daemon waymuxd The per-user control daemon. Owns the session registry, lifecycle supervision, event broadcast, and the msgpack-RPC accept loop.
waymux-session waymux-session One process per session. A full headless Wayland compositor with a virtual output: Wayland protocol dispatch, recording, screenshot, attach, and viewer subsystems all live here.
waymux-attach waymux-attach Attach client that connects to an outer compositor and embeds a session's focused window into it via display-fd passing.
waymux-mcp waymux-mcp MCP (Model Context Protocol) server. A thin stdio JSON-RPC wrapper: each of its 22 tools maps to exactly one CLI verb and runs it via argv with no shell.

Rust libraries (publishable)

Crate Kind Purpose
waymux-protocol library Wire types and framing for the waymux control protocol: request, response, and event message types plus the length-prefixed msgpack codec. The source of truth for the wire format and the stable E_* error-code set.
waymux-mux-mkv library A small, dependency-free Matroska (MKV) muxer. Writes a single video track (FFV1, H.264, or HEVC) into a streamable .mkv container without pulling in a full media framework.

Go module

Module Kind Purpose
waymux-neko-bridge Go binary WebRTC viewer bridge (derived from neko, Apache-2.0). Spawned per session by waymux-session. Handles Pion WebRTC, WebSocket signaling, Ed25519 viewer-token validation, multi-viewer fan-out, GCC bandwidth feedback, and input translation.

Publishable libraries#

Only waymux-protocol and waymux-mux-mkv are intended for consumption outside the waymux tree. Both carry publish = true (or no publish field, which defaults to true), while every other crate in the workspace explicitly sets publish = false.

waymux-protocol#

The control-plane wire contract. Contains RequestMethod (26 variants), Response, EventBody (10 variants), SessionCtlMethod (the daemon-to-session sub-protocol), supporting enums (ErrorCode, RecordingCodec, CaptureMode, ScreenshotFormat, KeyState, TouchPhase), and encode_frame / decode_frame. Serialization is rmp-serde with named fields and extensive #[serde(default)] for forward and backward compatibility. An extensive round-trip test suite pins the wire contract.

Future home: crates.io/crates/waymux-protocol and docs.rs/waymux-protocol. rustdoc is the API reference once published.

# Cargo.toml (once published)
[dependencies]
waymux-protocol = "0.2"

waymux-mux-mkv#

A streaming Matroska muxer with no dependencies beyond the Rust standard library. It accepts typed NAL units or raw frame bytes and writes a compliant .mkv file with a single video track. Useful any time you want to produce MKV output in process without depending on ffmpeg or a heavyweight media framework.

Future home: crates.io/crates/waymux-mux-mkv and docs.rs/waymux-mux-mkv. rustdoc is the API reference once published.

# Cargo.toml (once published)
[dependencies]
waymux-mux-mkv = "0.2"

MSRV#

The minimum supported Rust version for the workspace is 1.88. The MSRV gate is tested in CI with a plain cargo build --workspace (no dev-deps) to avoid dev-dependency inflation raising the floor silently. Older toolchains will be rejected by the rust-version field in Cargo.toml.

Note: the MSRV is 1.88 because #[derive(Default)] on structs containing raw pointers (*mut c_void) requires the raw-pointer Default stabilization that landed in that release.