Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
152 lines (142 loc) · 5.91 KB
/
Copy pathCargo.toml
File metadata and controls
152 lines (142 loc) · 5.91 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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
[workspace]
resolver = "2"
members = [
"crates/perf-test-support",
"crates/idle-err",
"crates/idle-log",
"crates/wayland-idle",
"crates/wayland-present",
"crates/idle-dbus",
"crates/idle-upscaler",
"crates/idle-ipc",
"idle-api",
"idle-runner",
"idle-daemon",
]
[profile.release]
opt-level = 3 # Speed, not size. `z` disables loop vectorization and
# most inlining, and this binary spends its life in
# per-pixel CPU upscale loops (idle-upscaler) and
# frame compositing, on battery, for hours. The six
# other repos declare no release profile and get
# cargo's default (3) — the render path should not be
# the odd one out. See packages/ for size-sensitive
# artifacts instead.
lto = "fat" # Whole-program LTO. Outperforms `lto = true` (thin LTO)
# by another ~2–6% on per-pixel work because LLVM can
# inline across crate boundaries when the bindings
# are monomorphized.
codegen-units = 1 # Single codegen unit maximizes cross-function inlining
# during LTO. The 5–10× cold-compile tax is paid once
# per release cycle, not per frame.
panic = "unwind" # REQUIRED: idle-dbus wraps D-Bus calls in catch_unwind
# to survive a panic. Under `abort` those layers are
# dead code in the only profile that ships, while
# `unwrap_used`/`expect_used` are allowed below — a
# single panic would kill the daemon for the session.
strip = true # Strip symbols and debuginfo
# `target-cpu` is intentionally left at cargo's default of `generic` here.
# Two reasons: (a) this is a virtual workspace manifest and cargo does not
# accept conditional `[target.*]` tables in virtual manifests; (b) macOS
# Apple Silicon and Linux aarch64 builds cannot both target `x86-64-v3`.
# Maintainers who want a per-microarch build drop a `.cargo/config.toml`
# next to this file with:
# [target.x86_64-unknown-linux-gnu]
# runner = "/…/sccache …"
# rustflags = ["-C", "target-cpu=x86-64-v3"]
# or set `CARGO_BUILD_RUSTFLAGS=-C\ target-cpu=x86-64-v3 cargo build --release`.
[workspace.dependencies]
tokio = { version = "1.52", features = ["full"] }
libc = "0.2"
zbus = { version = "5.12", default-features = false, features = ["tokio"] }
idle-api = { path = "idle-api" }
idle-dbus = { path = "crates/idle-dbus" }
idle-err = { path = "crates/idle-err" }
idle-log = { path = "crates/idle-log" }
idle-runner = { path = "idle-runner" }
idle-upscaler = { path = "crates/idle-upscaler" }
idle-ipc = { path = "crates/idle-ipc" }
wayland-idle = { path = "crates/wayland-idle" }
wayland-present = { path = "crates/wayland-present" }
# Bench harness. `default-features = false` drops the `rayon` parallel
# runner (we use the default single-thread runner — bench numbers stay
# deterministic across CI runner hosts). `plotters` + `cargo_bench_support`
# are pulled in via the `html_reports` feature so `cargo bench -- --bench`
# can produce a report artifact if a maintainer wants one.
criterion = { version = "0.8", default-features = false, features = ["html_reports"] }
# Allocator. The per-binary opt-in (see `idle-daemon`'s `[features]`)
# marks this dep `optional` on the consuming side — workspace
# dependencies cannot be marked optional themselves. The default
# allocator stays the system one so musl/BSD builds are unaffected.
mimalloc = { version = "0.1", default-features = false }
# Used by the OODA tick condvar wait (`daemon/power_watcher.rs`)
# and the frame-loop frame-callback condvar
# (`presentation/frame_signal.rs`). Fast-path `Condvar::wait_for`
# with closure predicates — cheaper than `std::sync` and doesn't
# take a `&mut Guard` from the waiter for the predicate closure.
parking_lot = "0.12"
[workspace.lints.rust]
unused_must_use = "warn"
dead_code = "warn"
unsafe_op_in_unsafe_fn = "warn"
deprecated = "allow"
[workspace.lints.clippy]
# Disable pedantic groups that are noisy or incompatible with FFI code
pedantic = { level = "warn", priority = -1 }
module_name_repetitions = "allow"
must_use_candidate = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
similar_names = "allow"
cast_precision_loss = "allow"
cast_possible_truncation = "allow"
cast_sign_loss = "allow"
cast_lossless = "allow"
cast_abs_to_unsigned = "allow"
# Allow common helper-method patterns
many_single_char_names = "allow"
ignored_unit_patterns = "allow"
struct_excessive_bools = "allow"
manual_let_else = "allow"
unnecessary_wraps = "allow"
cast_possible_wrap = "allow"
ptr_as_ptr = "allow"
doc_markdown = "allow"
needless_pass_by_value = "allow"
single_match_else = "allow"
items_after_statements = "allow"
borrow_as_ptr = "allow"
unchecked_time_subtraction = "allow"
unnecessary_cast = "allow"
map_unwrap_or = "allow"
type_complexity = "allow"
redundant_closure_for_method_calls = "allow"
io_other_error = "allow"
case_sensitive_file_extension_comparisons = "allow"
if_not_else = "allow"
uninlined_format_args = "allow"
too_many_arguments = "allow"
redundant_else = "allow"
format_push_string = "allow"
too_many_lines = "allow"
unused_async = "allow"
unused_async_trait_impl = "allow"
implicit_clone = "allow"
used_underscore_binding = "allow"
manual_range_contains = "allow"
unreadable_literal = "allow"
semicolon_if_nothing_returned = "allow"
# Warn on anti-patterns (target deny-by-default in 0.4 once coverage catches up)
unwrap_used = "allow"
expect_used = "allow"
panic = "warn"
todo = "warn"
unimplemented = "warn"
unreachable = "warn"
[profile.release-with-debug]
inherits = "release"
debug = 1
strip = "none"
[workspace.package]
authors = ["idlescreen developers"]
repository = "https://github.com/idlescreen/idlescreen"