Skip to content

TinyStats v1.0.0 — MiniStats rewritten in Machin, 71 KB binary

Choose a tag to compare

@javimosch javimosch released this 11 Aug 08:02
· 8 commits to master since this release

A rewrite of MiniStats in Machin/MFL.

The pitch

MiniStats is a real-time multi-machine metrics dashboard. The original is built with Bun/TypeScript and compiles to a 99 MB binary because it bundles the entire Bun runtime.

TinyStats is the same app rebuilt in Machin — a language that compiles through C to native code. The binary is 71 KB. That's a 1400× reduction.

MiniStats (Bun) TinyStats (Machin)
Binary size 99 MB 71 KB
Runtime bundled yes (Bun) no (pure C output)
Source lines ~300 TS ~250 MFL

What it does

  • Real-time CPU/memory/disk/inode metrics via WebSocket
  • Multi-machine dashboard (2-column grid, IBM Plex Mono, scanline overlay)
  • Stale client detection and pruning
  • HTTP POST for clients (works behind firewalls that block WebSocket)
  • Zero-config: one static binary, no runtime to install

Install

curl -fsSL https://raw.githubusercontent.com/javimosch/machin-tinystats/master/scripts/install.sh | bash
tinystats server --port 9094

Then on each machine:

tinystats client --name my-box --server http://YOUR_SERVER:9094

Open → http://localhost:9094

How

The server uses Machin's machweb framework (HTTP) + ws framework (WebSocket RFC 6455) — both pure MFL, no external libraries. The client uses http_request() to POST JSON. A single hub goroutine owns all state, race-free by design. No database, no persistence — just what's happening now.