fuzzball

A terminal protocol, and the crate that speaks it.

Fuzzball is a small family of terminal extensions, implemented first in Mouser: structured keyboard events, cell-anchored graphics, silent shell actions and plugins. The fuzzball crate encodes and decodes it, with no dependencies, no I/O and no terminal library: bring your own reader and writer.

Version 1.0.0 · BSD-3-Clause · MSRV Rust 1.85

Get the crate Read the spec

Why Fuzzball

Get the crate

Cargo

cargo add fuzzball

or in Cargo.toml:

[dependencies]
fuzzball = "1"

Version 1.0.0. Within 1.x there are no breaking changes to the wire format or the API.

Links

Decode key events

use fuzzball::{Decoder, Item};
use fuzzball::keyboard::KeyEvent;

let mut d = Decoder::new();
d.push(input);
while let Some(item) = d.next() {
    if let Item::Message(m) = item {
        if let Some(ev) = KeyEvent::from_message(&m) {
            println!("{:?} {:?}", ev.key, ev.text);
        }
    }
}

The spec

Every message shares one frame: a DCS string with the private marker = and the family tag Fz, then a one-letter subsystem and verb.

ESC P = F z <subsystem> <verb> ; <params> [: <payload>] ESC \

The spec source lives in the crate repo: github.com/WeirdBrains/fuzzball/docs.