Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
66 lines (60 loc) · 3.13 KB
/
Copy pathCargo.toml
File metadata and controls
66 lines (60 loc) · 3.13 KB
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
[workspace]
members = ["crates/paperback", "crates/paperback-core", "crates/paperback-formats", "crates/pb", "crates/xtask"]
resolver = "2"
[workspace.package]
version = "1.0.0"
edition = "2024"
rust-version = "1.91.1"
license = "MIT"
repository = "https://github.com/trypsynth/paperback"
# Deps shared by two or more crates in this workspace.
[workspace.dependencies]
anyhow = "1.0.104"
base64 = "0.23.1"
bitflags = "2.13.2"
rstest = "0.27.0"
toml = "1.1.6"
# Lint policy for every crate in the workspace; each member opts in with `[lints] workspace = true`.
# `clippy::all` is denied so CI fails on it. The pedantic and nursery groups are warnings we're
# driving to zero so CI can gate on them too; the allows further down are the lints from those
# groups we've decided not to enforce, each with its reason.
[workspace.lints.rust]
# `objc`'s `msg_send!` macro (used by the desktop crate on macOS) expands to a
# `cfg(feature = "cargo-clippy")` check. No crate here defines that feature, so the compiler
# would warn about it; macros from crates written before this check existed need it suppressed.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("cargo-clippy"))'] }
[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
# Paperback ships as an application, not a published library, so there's no downstream caller to
# write `# Panics`/`# Errors` sections for; they'd be write-only documentation.
missing_panics_doc = "allow"
missing_errors_doc = "allow"
# Format parsers are long by nature. Splitting a header walk into arbitrary chunks to satisfy a
# line count makes it harder to follow, not easier.
too_many_lines = "allow"
# Options and config structs legitimately carry a lot of independent flags.
struct_excessive_bools = "allow"
# Formatting preferences that fight how this code is already written, with no correctness angle.
items_after_statements = "allow"
too_long_first_doc_paragraph = "allow"
similar_names = "allow"
[profile.release]
strip = true
opt-level = "z"
lto = true
panic = "abort"
codegen-units = 1
# zip reads a ZIP64 extended information extra field over an entry's own size and offset fields
# whenever the block is 24 bytes or longer, without checking that any of those fields actually
# holds the 0xFFFFFFFF sentinel asking for it. Some EPUB writers attach a malformed block that
# no field asked for, and the bad offset that results fails the whole archive with "Invalid
# local file header", even though unzip, Python and 7-Zip all read it fine.
# Fixed upstream in zip-rs/zip2#962, merged but not yet published: 9.0.0-pre3 is still the newest
# version on crates.io. Drop this once the fix reaches a release.
[patch.crates-io]
# Pinned to wxDragon main for the binary-size work (its #224 and #225) and the tree item data fix
# (#241), none of it released yet. Swap back to a plain version requirement once a release carries them.
wxdragon = { git = "https://github.com/AllenDang/wxDragon", rev = "82356530e28062b0909de96b6831a585cae7256c" }
zip = { git = "https://github.com/zip-rs/zip2.git", rev = "96407e1332cb9ec8f39af88e6dac866ce83995b8" }