SPACE.LA
◀ music select
personal / tool / archived

TrayBin RS

Rust port of the Go systray-portable binary: a cross-platform system-tray process speaking JSON over stdin/stdout, built on the tray-icon and winit crates with base64 icon decoding, as a drop-in backend for the Node TrayBin library.

BPM
133
GRADE
B
LEVEL
4
RELEASES
0
YEARS
2025–2025

A Menu Bar Over Stdin

Putting an icon in the menu bar from desktop JavaScript means talking to native APIs, which Node doesn't do well. The existing answer was systray-portable, a Go binary that owns the tray and speaks JSON over stdin and stdout while your app handles the logic. In August 2025 I rewrote it in Rust.

The tray-icon and winit crates do the platform work, icons come in base64 encoded through the same JSON channel, and the protocol matches the original closely enough to be a drop-in replacement for whatever the Node TrayBin library was already launching. So no redesigning anything; existing code shouldn't be able to tell the difference.

It fit with what I'd been doing all year with egui, UniFFI and Gouda: two programs talking over a pipe, each in the language that's good at its half.

led to

  • Milkish2026winit system-tray process
  • Moo2026cross-platform tray process