LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

Software

MecoFax, a Pure-Rust Web Fax Server, Breaks Its Own Build If Any C Code Tries to Sneak In

The MIT-licensed Docker app registers with a PBX, SIP provider, or FRITZ!Box to handle 33,600 bit/s Super G3 faxes straight from a browser inbox.

In a high-contrast 1-bit dithered thermal-print illustration, Chris Pirillo stands beside a quiet workbench with an amused, skeptical look, holding up a curling sheet of fax paper streaming from a compact desk terminal.
Illustration: LockerGnome

Somewhere out there, a sysadmin is still babysitting a beige multifunction printer because one vendor insists on receiving signed forms over a phone line (yes, fax still lives). HeyMeco’s answer is to throw out decades of C telecom code and rebuild the entire fax machine from scratch in Rust, right down to the modem audio tones. Every crate in the workspace enforces #![forbid(unsafe_code)], and the repository puts its money where its compiler is: “The Docker build sets CC=/bin/false, so it would fail if anything tried to compile C.”

That rule leaves nowhere to hide. Fax over IP normally leans on battle-scarred C libraries like spandsp to handle the ugly signal processing. MecoFax leaves spandsp strictly in the Docker test harness as a sparring partner alongside Asterisk (“spandsp is only used as the test peer and is not part of MecoFax”) and writes the whole stack itself across eight Rust crates. Its crates/dsp module implements G.711, tones, HDLC, and the V.8, V.21, V.27ter, V.29, V.17, and V.34 modems—complete with Super G3 4D Wei TCM shell mapping—reaching 33,600 bit/s over both G.711 and T.38 v3. When a cranky remote line refuses to cooperate, it falls back automatically to V.17 at 14,400 bit/s and T.38 v0 with Error Correction Mode and MH/MR/MMR compression.

The no-C oath extends past the wire protocol. SIP registration, RTP, jitter buffering, STUN, and T.38 re-INVITE switching run on rsipstack. Rasterizing PDFs, images, and text into fax pages uses hayro, and even the SQLite-format storage layer runs in pure Rust via turso_core. On top of the axum server sits an embedded Svelte 5 web app inspired by scanserv.js and FRITZ!Fax, localized in German and English—which tells you plenty about where fax culture still thrives. You get a setup wizard with a built-in fritz.box preset, live line status, a composer that previews the actual 1-bit fax rendering before you hit send, cover pages, scheduled jobs, and a phonebook that imports vCard, CSV, and FRITZ!Box XML.

For anyone automating paperwork, MecoFax ships a REST API with mfx_ bearer tokens and a one-call POST /api/v1/send endpoint, demonstrated in the docs with a curl request sending invoice.pdf under the subject "Rechnung 4711". Incoming faxes can forward automatically to a mounted folder under /mnt/faxes, an SMTP address, or a webhook, with per-number caller ID, station ID, number blocking, and retention rules. Deployment is a docker compose up -d using prebuilt linux/amd64 and linux/arm64 images that run as non-root UID 65532 on host networking so SIP and RTP stop fighting NAT. Settings defined in mecofax.toml or MECOFAX_* environment variables override the browser UI and lock those fields read-only, while a --simulate flag spins up the entire interface with simulated telephony so you can kick the tires before wiring up a live trunk.

Faxing is the cockroach of office protocols, and paying a cloud fax vendor every month to emulate a 1990s dial-up screech feels like a bad joke (especially when the fine print bills per page). MecoFax meets reality where it lives, handing operators a single container, a clean REST endpoint, and an Asterisk-plus-spandsp interop matrix covering G.711 and T.38 across V.17, V.29, and V.27ter so it actually talks to grumpy hardware on the other end. Call it all the fax with none of the C-compiler fiction.

If your office still demands a fax confirmation sheet in 2026, you might as well let Rust make the screeching noises. Just don’t tell the printer it’s been replaced.

More Software

Every Software story →