Skip to main content

Crate ipp_printer_app

Crate ipp_printer_app 

Source
Expand description

Pure-Rust IPP Everywhere framework for building CUPS-driverless “printer applications” — the modern replacement for the PPD-driven filter+backend model.

The framework runs an axum HTTP listener that speaks IPP over POST on /ipp/print/<printer-name>. It’s device-agnostic: a consumer crate supplies a DeviceBackend (enumerate physical devices, poll their status) plus a RasterDriver (turn a PWG raster page into device bytes), and the framework handles the rest — job registry with monotonic ids, Get-Jobs/Get-Job-Attributes/Cancel-Job, background status polling, optional mDNS / DNS-SD advertising (enabled by the default mdns feature), JSON state persistence.

See examples/minimal_server.rs for the smallest end-to-end usage.

Re-exports§

pub use device::DeviceBackend;
pub use flags::PrinterReason;
pub use job::JobId;
pub use job::JobRecord;
pub use job::JobRegistry;
pub use job::JobState;
pub use printer::PrinterConfig;
pub use printer::PrinterHandle;
pub use printer::PrinterRecord;
pub use printer::PrinterRegistry;
pub use raster::JobFailure;
pub use raster::JobOptions;
pub use raster::RasterDriver;
pub use server::JobContext;
pub use server::Server;
pub use server::ServerOptions;
pub use state::default_state_path;
pub use state::PersistedState;

Modules§

attributes
Build Get-Printer-Attributes / Validate-Job IPP responses.
device
DeviceBackend trait: enumerate physical devices, resolve driver names, poll live status.
flags
IPP printer-state-reasons bit flags (PWG 5101.1 keywords).
job
Per-server job registry: allocates job-ids, tracks state for Get-Jobs / Get-Job-Attributes / Cancel-Job.
mdns
mDNS / DNS-SD advertising for IPP printers (_ipp._tcp.local.).
printer
Per-printer configuration and runtime state.
raster
RasterDriver trait + page-header DTO for raster print jobs.
server
Axum HTTP server: IPP over POST /ipp/print/:name.
state
Persisted printer list (JSON).
status
Background printer-state-reasons poller.