ipp-printer-app
Pure-Rust IPP Everywhere framework for building CUPS-driverless printer applications — the modern replacement for the PPD-driven CUPS filter+backend model.
The framework speaks IPP over HTTP on /ipp/print/<name>, runs the job
state machine, tracks printer-state-reasons, and (optionally)
advertises itself over mDNS. You supply two things:
- a [
DeviceBackend] — how to enumerate physical devices and poll their status, and - a [
RasterDriver] — how to turn a PWG-raster page into device bytes.
That's enough to land in CUPS via lpadmin -m everywhere and have
cups-browsed pick the printer up automatically.
Quick start
Minimal server (no real device, just shows the wiring):
use Arc;
use ;
use RwLock;
;
async
See examples/minimal_server.rs for a
runnable version.
What's in the box
| Concern | What you get |
|---|---|
| IPP wire format | ipp crate (parser + types) |
| HTTP server | axum 0.8 on tokio |
| Job lifecycle | JobRegistry with monotonic ids, Get-Jobs / Get-Job-Attributes / Cancel-Job |
| Live status | Background poll loop calling DeviceBackend::poll_status, configurable cadence (IPP_PRINTER_APP_POLL_SECS, default 30 s) |
| Discovery | mDNS _ipp._tcp.local. via mdns-sd, default-on mdns feature |
| State | JSON registry persisted at $XDG_STATE_HOME/<app-id>.state.json |
| Raster format | PWG raster + legacy CUPS raster v1/v2 via print_raster |
What's not here:
- A device-side raster transform (dither, column-major, compression) —
that's
RasterDriverterritory. - A real-time job spooler with on-disk job persistence (in-memory only).
- HTTPS / IPP-over-TLS.
- URF format support (only PWG raster + CUPS raster).
- Color / multi-bit raster — the surface is 1bpp monochrome by default, drivers can extend.
Features
| Feature | Default | What it pulls in |
|---|---|---|
mdns |
✓ | mdns-sd (~200 KB) for _ipp._tcp.local. advertising |
For embedded targets without mDNS, build with --no-default-features to
drop ~200 KB of dependencies.
CUPS integration
Once a printer application is running on localhost:8631:
If you have cups-browsed running and built the framework with the
default mdns feature, the queue auto-appears within ~10 seconds and
no manual lpadmin is needed.
Reference consumer
supvan-cups (Supvan label
printers) is the reference real-world consumer. The full chain there:
supvan-app (binary) → supvan-proto (Bluetooth / USB HID transport)
→ ipp-printer-app (this crate) → axum / ipp / print_raster.
MSRV
Rust 1.74.
License
MIT.