Closes#27
Relates to #25 (Milestone 6: Native Raw OS Printing Engine)
This PR implements Sub-Task 2 of Milestone 6: the native macOS and Linux CUPS printing backend in Tauri Rust.
Key Changes
CUPS Printer Discovery (get_cups_printers):
Implemented parser for lpstat -e (available destinations), lpstat -p (detailed connection/queue statuses), and lpstat -d (default destination).
Merges discovery and status into a structured Printer model (name, status, is_default).
CUPS Target Print Spooling (print_target_cups):
Direct raw queue dispatch via lp -d <printer> -t <title> -o raw <tiff_path> ensuring CUPS PPD filters and macOS ColorSync transforms are completely bypassed.
Configurable fallback for PPD-based uncorrected passthrough (-o ColorModel=Gray -o cm-calibration) for printers that do not accept direct raw TIFF ingestion.
Tauri IPC Command Registration:
Registered get_cups_printers and print_target_cups with platform conditional compilation (#[cfg(unix)] / #[cfg(windows)]).
Unit & Integration Tests:
Added comprehensive test suite for lpstat -e, lpstat -p, lpstat -d parsing, printer info merging, argument building, and error handling for missing files.
Testing
cargo check and cargo test pass (15/15 tests passing).
Verified printer enumeration against local CUPS daemon on Linux.
## Summary
Closes #27
Relates to #25 (Milestone 6: Native Raw OS Printing Engine)
This PR implements Sub-Task 2 of Milestone 6: the native macOS and Linux CUPS printing backend in Tauri Rust.
### Key Changes
- **CUPS Printer Discovery (`get_cups_printers`)**:
- Implemented parser for `lpstat -e` (available destinations), `lpstat -p` (detailed connection/queue statuses), and `lpstat -d` (default destination).
- Merges discovery and status into a structured `Printer` model (`name`, `status`, `is_default`).
- **CUPS Target Print Spooling (`print_target_cups`)**:
- Direct raw queue dispatch via `lp -d <printer> -t <title> -o raw <tiff_path>` ensuring CUPS PPD filters and macOS ColorSync transforms are completely bypassed.
- Configurable fallback for PPD-based uncorrected passthrough (`-o ColorModel=Gray -o cm-calibration`) for printers that do not accept direct raw TIFF ingestion.
- **Tauri IPC Command Registration**:
- Registered `get_cups_printers` and `print_target_cups` with platform conditional compilation (`#[cfg(unix)]` / `#[cfg(windows)]`).
- **Unit & Integration Tests**:
- Added comprehensive test suite for `lpstat -e`, `lpstat -p`, `lpstat -d` parsing, printer info merging, argument building, and error handling for missing files.
### Testing
- `cargo check` and `cargo test` pass (15/15 tests passing).
- Verified printer enumeration against local CUPS daemon on Linux.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Closes #27
Relates to #25 (Milestone 6: Native Raw OS Printing Engine)
This PR implements Sub-Task 2 of Milestone 6: the native macOS and Linux CUPS printing backend in Tauri Rust.
Key Changes
get_cups_printers):lpstat -e(available destinations),lpstat -p(detailed connection/queue statuses), andlpstat -d(default destination).Printermodel (name,status,is_default).print_target_cups):lp -d <printer> -t <title> -o raw <tiff_path>ensuring CUPS PPD filters and macOS ColorSync transforms are completely bypassed.-o ColorModel=Gray -o cm-calibration) for printers that do not accept direct raw TIFF ingestion.get_cups_printersandprint_target_cupswith platform conditional compilation (#[cfg(unix)]/#[cfg(windows)]).lpstat -e,lpstat -p,lpstat -dparsing, printer info merging, argument building, and error handling for missing files.Testing
cargo checkandcargo testpass (15/15 tests passing).