I’d like to share tincan, peer-to-peer voice and text chat that runs in the
terminal. No account and no server of its own a room is a name and a
passphrase.
The Ratatui part worth talking about is the divider. It is the only vertical
line on screen and it is not a border: it is derived from the live link every
frame. Four states, four glyphs: · when nobody is on the other end, │ when
every peer is reached directly, ╎ when someone is coming through a relay, and
┆ with gaps torn in it when audio is dropping. A theme module owns all of
that, so the view code never names a glyph or a colour of its own.
The part I like best is the pulse. While anyone is talking, one cell travels
down the line, and the row it sits on is computed from the round trip time. The
animation speed is the measurement, so a slow link is something you watch
rather than a number you read.
The empty screen draws the same thing full size: two cans, the string between
them, and the invite code underneath.
Rust, MIT, and on crates.io as tincan-chat.
