Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
pappl-sys
Raw bindgen FFI bindings for PAPPL, Michael Sweet's Printer Application Programming Library.
This crate is the unsafe layer. For typed handles, builders, and a DeviceScheme
trait that hides the unsafe extern "C" fn callback boilerplate, use
pappl-rs.
Status
Released as-is. The original authors no longer use PAPPL in their own projects; we publish this in case it's useful to others. PRs welcome, but active maintenance is best-effort.
Build requirements
| Package | Why |
|---|---|
libpappl-dev ≥ 1.0 |
the C library and headers (probed via pkg-config) |
libcups2-dev |
PAPPL pulls CUPS types into its public headers |
libclang-dev |
bindgen runs clang to parse the headers |
pkg-config |
locates the above |
On Debian/Ubuntu:
PAPPL version matrix
| PAPPL | Builds? | Notes |
|---|---|---|
| ≥ 1.4 | ✓ | Full API including papplSystemCreatePrinters (gated by cfg(pappl_1_4), exposed via the try_system_create_printers wrapper in lib.rs). |
| 1.0 – 1.3.x | ✓ | Older symbol set; the 1.4-only wrapper degrades to a no-op returning false. |
| < 1.0 | ✗ | pkg-config fails the build with a clear version error. |
This crate does NOT track the PAPPL ABI across versions automatically. If the C library changes a public-struct layout you'll need to rebuild against the new headers.
Why links = "pappl"?
Cargo enforces a single instance per process; if two crates in a build
both pulled in pappl-sys with conflicting versions you'd get a duplicate-
symbol mess at link time. The links key makes Cargo refuse that earlier
and louder.
Re-generating bindings
Bindings are regenerated from wrapper.h on every build. wrapper.h
includes only <pappl/pappl.h>; if you need extra PAPPL headers (e.g.
internals not in the public umbrella header), edit wrapper.h and the
allowlist_* calls in build.rs.
License
MIT — see LICENSE-MIT at the repo root.