forked from ajrcarey/pdfium-render
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
136 lines (121 loc) · 4.61 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
[package]
name = "pdfium-render"
version = "0.8.27"
edition = "2018"
rust-version = "1.61"
publish = true
description = "A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project."
readme = "README.md"
homepage = "/~https://github.com/ajrcarey/pdfium-render"
repository = "/~https://github.com/ajrcarey/pdfium-render"
license = "MIT OR Apache-2.0"
keywords = ["pdf", "pdfium"]
categories = ["api-bindings", "multimedia::images", "visualization", "wasm"]
authors = ["Alastair Carey <alastair@alastaircarey.com>"]
exclude = ["test/*.pdf"]
[lib]
name = "pdfium_render"
crate-type = ["lib", "staticlib", "cdylib"]
doctest = false
[dependencies]
bitflags = "2"
bytes = "1"
bytemuck = "1"
chrono = "0"
image_025 = { package = "image", version = "0.25", optional = true }
image_024 = { package = "image", version = "0.24", optional = true }
image_023 = { package = "image", version = "0.23", optional = true }
itertools = "0"
log = "0"
maybe-owned = "0"
once_cell = "1"
utf16string = "0"
vecmath = "1"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_log = "1"
console_error_panic_hook = "0"
js-sys = "0"
# wasm-bindgen 0.2.96 causes a build failure when compiling as part of github actions.
# For more details, see: /~https://github.com/ajrcarey/pdfium-render/issues/177
wasm-bindgen = { version = "<= 0.2.95", features = ["enable-interning"] }
wasm-bindgen-futures = { version = "0" }
web-sys = { version = "0", features = [
"TextDecoder",
"ImageData",
"Window",
"Response",
"Blob",
] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
libloading = "0"
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0", optional = true }
[build-dependencies]
# Bindgen 0.70.0 and later cause build failures when compiling to WASM. For more details, see:
# /~https://github.com/ajrcarey/pdfium-render/issues/156
bindgen = { version = "<=0.69.4", optional = true }
[dev-dependencies]
# Dependencies specific to examples. Dependencies for the WASM example in examples/wasm.rs
# are specified separately in examples/Cargo.toml.
rand = "0" # Used by examples/create.rs, examples/matrix.rs
rayon = "1" # Used by examples/thread_safe.rs
axum = "0" # Used by examples/axum_once_cell.rs
tokio = { version = "1", features = ["full"] } # Used by examples/axum_once_cell.rs
tower = "0" # Used by examples/axum_once_cell.rs
pdfium-render = { path = "./", default-features = false, features = ["sync"] } # sync feature required by examples/axum_once_cell.rs
[features]
default = ["pdfium_latest", "thread_safe", "image"]
image = ["image_latest"] # A synonym for backwards compatibility
bindings = ["dep:bindgen"]
static = []
thread_safe = []
"libstdc++" = ["static"]
"libc++" = ["static"]
sync = ["thread_safe"]
paragraph = []
flatten = []
# By default, pdfium-render uses the latest version of the image crate. To explicitly use
# an older version, select one of the feature flags below when taking pdfium-render as
# a dependency in your project's Cargo.toml.
image_latest = ["image_025"]
image_025 = ["dep:image_025"]
image_024 = ["dep:image_024"]
image_023 = ["dep:image_023"]
# PdfiumLibraryBindings supports pinning its API definitions to a specific Pdfium release.
# This allows pdfium-render consumers to safely upgrade their pdfium-render dependency without
# having to simultaneously upgrade their Pdfium dependency.
# By default, pdfium-render attempts to bind against the latest released version of the Pdfium API.
# To explicitly bind against an older version, select one of the feature flags below when
# taking pdfium-render as a dependency in your project's Cargo.toml.
pdfium_latest = ["pdfium_6721"]
pdfium_future = [
# For testing changes in Pdfium source control that are yet to be released.
"pdfium_use_skia",
"pdfium_enable_xfa",
"pdfium_enable_v8",
]
pdfium_6721 = []
pdfium_6666 = []
pdfium_6611 = []
pdfium_6569 = []
pdfium_6555 = []
pdfium_6490 = []
pdfium_6406 = []
pdfium_6337 = []
pdfium_6295 = []
pdfium_6259 = []
pdfium_6164 = []
pdfium_6124 = []
pdfium_6110 = []
pdfium_6084 = []
pdfium_6043 = []
pdfium_6015 = []
pdfium_5961 = []
# Certain Pdfium API functions are only made available when compile time flags are set
# when the Pdfium binary is compiled. The features below make these functions available
# in PdfiumLibraryBindings. They correspond to the Pdfium compile time flags
# _WIN32, PDF_USE_SKIA, PDF_ENABLE_XFA, and PDF_ENABLE_V8.
pdfium_use_win32 = ["dep:windows"]
pdfium_use_skia = []
pdfium_enable_xfa = []
pdfium_enable_v8 = []