mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 04:22:38 +01:00
# Conflicts: # crates/dialogs/src/lib.rs # crates/dialogs/src/ui/mod.rs # crates/draw/src/ui/gradient/mod.rs # crates/draw/src/ui/gradient/swatch.rs # crates/menu/src/shortcuts/view.rs # crates/menu/tests/it/main.rs # crates/menu/tests/it/shortcuts/mod.rs # crates/pages/tests/it/main.rs # crates/print/src/lib.rs # crates/review/tests/it/main.rs # crates/story-render/src/main.rs # crates/table/tests/it/main.rs # crates/text/tests/it/main.rs # crates/ui-canvas/src/canvas/navigate/mod.rs # crates/ui-canvas/tests/it/canvas/mod.rs # crates/ui-contract/tests/it/access/mod.rs # crates/ui-contract/tests/it/fonts/mod.rs # crates/ui-contract/tests/it/runtime/mod.rs # crates/ui-gallery/src/foundations/mod.rs # crates/ui-patterns/src/patterns/preferences/mod.rs # crates/ui-patterns/tests/it/docking/mod.rs # crates/ui-patterns/tests/it/form_dialogs/mod.rs # crates/ui-patterns/tests/it/panels/palette.rs # crates/ui-patterns/tests/it/preferences/mod.rs # crates/ui-shell/src/shell/mod.rs # crates/ui-shell/tests/it/shell/mod.rs # crates/ui-widgets/src/tabs/strip.rs # crates/ui-widgets/tests/it/bars/mod.rs # crates/ui-widgets/tests/it/contract/mod.rs # crates/ui-widgets/tests/it/layout/mod.rs # crates/ui-widgets/tests/it/main.rs # crates/ui-widgets/tests/it/menu/mod.rs # crates/ui-widgets/tests/it/pickers/mod.rs # crates/ui-widgets/tests/it/text/mod.rs
82 lines
3.9 KiB
TOML
82 lines
3.9 KiB
TOML
[package]
|
|
name = "craft-print"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
description = "System PDF print spooler for the Craft apps: CUPS and Windows"
|
|
autotests = false
|
|
|
|
[lib]
|
|
# The lib's test target is the crate's one test executable: its trials and, with `screen-testing`, the
|
|
# screen tests in tests/it.
|
|
harness = false
|
|
|
|
[features]
|
|
suite = ["screen-testing", "craft-ui/suite"]
|
|
default = []
|
|
# The printer and job settings widgets (`craft_print::ui`).
|
|
ui = ["dep:craft-behavior", "dep:craft-ui", "dep:egui"]
|
|
# The stories and the integration binary of the print panel.
|
|
screen-testing = ["ui", "craft-ui/testing"]
|
|
|
|
[dependencies]
|
|
craft-behavior = { workspace = true, optional = true }
|
|
craft-host = { workspace = true }
|
|
craft-ui = { workspace = true, optional = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
egui = { workspace = true, optional = true }
|
|
# Safe API; Win32 calls are isolated in this maintained MIT OR Apache-2.0 dependency.
|
|
# Keep the public rgb re-export at main's GDI revision: a different Git rev gives
|
|
# downstream GDI values a different Rust type identity even when the code is unchanged.
|
|
# PDF loader updates below are independent of this public transport API.
|
|
craft-winprint-gdi = { git = "https://github.com/storytold/winprint.rs", rev = "64e7afd4d1483512385012c340ecaaaf0f3beb7f" }
|
|
# Says why the printer list is empty when lpstat can't run (e.g. a Flatpak without CUPS tools),
|
|
# and why a job went on with the paper the request names while the driver reported only one side
|
|
# of it (storytold/craft-libs#7230).
|
|
log = "0.4"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
# Printing without starting anything (storytold/pdfcraft#1107): the printer list (EnumPrinters)
|
|
# and the job (Windows.Data.Pdf drawn with Direct2D into the XPS print API, options as a
|
|
# PrintTicket) are safe wrappers over Win32 and WinRT (BSD-3-Clause). Its default `pdfium`
|
|
# feature downloads PDFium at build time and is off. The maintained BSD-3-Clause fork
|
|
# preserves terminal failures/cancellation and bounds the completion notification wait, and
|
|
# creates the Direct2D factory multi-threaded, since Windows.Data.Pdf draws on its own worker
|
|
# threads (storytold/pdfcraft#5006). File-backed PDF loading avoids StorageFile access
|
|
# denial without whole-job buffering; includes the #15 test cleanup and explicit WinRT
|
|
# feature. It draws each page at the job's resolution rather than ~96 dpi (winprint.rs#19,
|
|
# storytold/pdfcraft#4941), writes QName values as prefix:local so drivers accept the merged
|
|
# ticket (winprint.rs#12, storytold/pdfcraft#3823), and reads whitespace-padded integers in
|
|
# PrintCapabilities (winprint.rs#3, storytold/pdfcraft#2430). Pinned to an immutable revision;
|
|
# review before bumping. The settings chosen in a driver's own dialog become a ticket through
|
|
# `PrintTicket::from_dev_mode` (winprint.rs#24, pinned at its merge commit on winprint.rs's
|
|
# `main`).
|
|
winprint = { git = "https://github.com/storytold/winprint.rs", rev = "8ae097ef941b432b0e7671b1ec3a506800e65e57", default-features = false }
|
|
# GetDefaultPrinter (MIT).
|
|
winsafe = { version = "0.0.29", default-features = false, features = ["winspool"] }
|
|
# The job file's private folder.
|
|
tempfile = "3"
|
|
# Reading the PrintTicket and PrintCapabilities the driver hands back.
|
|
roxmltree = "0.21"
|
|
# Inflating the print-ready PDF's cross-reference and object streams (src/sheets.rs).
|
|
miniz_oxide = "0.9"
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
# The browser's print dialog (src/browser.rs): the PDF as an object URL in a hidden iframe
|
|
# (MIT OR Apache-2.0).
|
|
js-sys = "0.3"
|
|
wasm-bindgen = "0.2"
|
|
web-sys = { version = "0.3", features = ["Blob", "BlobPropertyBag", "Url", "HtmlIFrameElement", "HtmlElement", "Element", "Node", "Document", "Window", "CssStyleDeclaration"] }
|
|
|
|
[dev-dependencies]
|
|
craft-ui = { workspace = true, features = ["suite"] }
|
|
tempfile = "3"
|
|
roxmltree = "0.21"
|
|
miniz_oxide = "0.9"
|