forked from qarmin/czkawka
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
187 lines (173 loc) · 6.19 KB
/
Cargo.toml
File metadata and controls
187 lines (173 loc) · 6.19 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[workspace]
members = [
"czkawka_core",
"czkawka_cli",
"czkawka_gui",
"krokiet"
]
exclude = [
"misc/test_read_perf",
"misc/test_image_perf",
"misc/test_compilation_speed_size",
"ci_tester",
]
resolver = "3"
[profile.release]
# panic = "unwind" in opposite to "abort", allows to catch panic!()
# Since Czkawka parse different types of files with few libraries, it is possible
# that some files will cause crash, so at this moment I don't recommend to use "abort"
# until you are ready to occasional crashes
panic = "unwind"
# Should find more panics, that now are hidden from user - in long term it should decrease bugs in app
# It may cause some crashes, that are not handled via panic::catch_unwind, so feel free to disable it, if you want
overflow-checks = true
# LTO setting is disabled by default, because release mode is usually needed to develop app and compilation with LTO would take a lot of time
# But it is used to optimize release builds(and probably also in CI, where time is not so important as in local development)
# Fat lto, generates a lot smaller executable than thin lto
# Also using codegen-units = 1, to generate smaller binaries
#lto = "fat"
#codegen-units = 1
# Optimize all dependencies except application/workspaces, even in debug builds to get reasonable performance e.g. when opening images
[profile.dev.package."*"] # OPT PACKAGES
opt-level = 3 # OPT PACKAGES
[profile.fast_release]
inherits = "release"
incremental = true
overflow-checks = true
debug = false
strip = true
[profile.test]
debug-assertions = true # Forces to crash when there is duplicated item in cli
overflow-checks = true
opt-level = 3
# Fast compilation and small binary size
[profile.fastci]
inherits = "dev"
strip = "symbols"
debug = false
lto = "off"
[profile.rdebug]
inherits = "release"
debug = "full"
strip = "none"
# Unsafe profile, just to check, how fast and small app could be
[profile.fastest]
inherits = "release"
panic = "abort"
lto = "fat"
strip = "symbols"
codegen-units = 1
opt-level = 3
debug = false
[workspace.lints]
clippy.unreachable = "allow" # This is a legitimate use case in most places
clippy.enum_variant_names = "allow" # Not always is possible to use different names
clippy.too_many_arguments = "allow" # Sometimes such functions are needed
clippy.type_complexity = "allow" # Sometimes such types are needed
clippy.collapsible_else_if = "allow" # Sometimes it is more readable
clippy.iter_on_single_items = "allow" # Allows to extend slice items, without needing to converting it when number of items change
clippy.doc_broken_link = "warn"
clippy.ip_constant = "warn"
clippy.unnecessary_semicolon = "warn"
clippy.trivially_copy_pass_by_ref = "warn"
clippy.indexing_slicing = "warn"
clippy.non_std_lazy_statics = "warn"
clippy.undocumented_unsafe_blocks = "warn"
clippy.manual_midpoint = "warn"
clippy.ignore_without_reason = "warn"
clippy.elidable_lifetime_names = "warn"
#clippy.duration_suboptimal_units = "warn"
#clippy.decimal_bitwise_operands = "warn"
clippy.allow_attributes = "warn"
clippy.assertions_on_result_states = "warn"
clippy.bool_to_int_with_if = "warn"
clippy.branches_sharing_code = "warn"
clippy.collection_is_never_read = "warn"
clippy.dbg_macro = "warn"
clippy.debug_assert_with_mut_call = "warn"
clippy.empty_enum_variants_with_brackets = "warn"
clippy.enum_glob_use = "warn"
clippy.equatable_if_let = "warn"
clippy.error_impl_error = "warn"
clippy.explicit_into_iter_loop = "warn"
clippy.explicit_iter_loop = "warn"
clippy.expl_impl_clone_on_copy = "warn"
clippy.fallible_impl_from = "warn"
clippy.filter_map_next = "warn"
clippy.flat_map_option = "warn"
clippy.float_cmp = "warn"
clippy.from_iter_instead_of_collect = "warn"
clippy.ignored_unit_patterns = "warn"
clippy.implicit_clone = "warn"
clippy.index_refutable_slice = "warn"
clippy.invalid_upcast_comparisons = "warn"
clippy.iter_filter_is_ok = "warn"
clippy.iter_filter_is_some = "warn"
clippy.iter_on_empty_collections = "warn"
clippy.iter_with_drain = "warn"
clippy.large_stack_arrays = "warn"
clippy.large_types_passed_by_value = "warn"
clippy.literal_string_with_formatting_args = "warn"
clippy.lossy_float_literal = "warn"
clippy.macro_use_imports = "warn"
clippy.manual_assert = "warn"
clippy.manual_instant_elapsed = "warn"
clippy.manual_is_variant_and = "warn"
clippy.manual_let_else = "warn"
clippy.manual_ok_or = "warn"
clippy.map_unwrap_or = "warn"
clippy.match_bool = "warn"
clippy.match_same_arms = "warn"
clippy.match_wildcard_for_single_variants = "warn"
clippy.mutex_atomic = "warn"
clippy.mutex_integer = "warn"
clippy.mut_mut = "warn"
clippy.needless_bitwise_bool = "warn"
clippy.needless_collect = "warn"
clippy.needless_continue = "warn"
clippy.needless_for_each = "warn"
clippy.needless_pass_by_ref_mut = "warn"
clippy.needless_pass_by_value = "warn"
clippy.needless_raw_strings = "warn"
clippy.nonstandard_macro_braces = "warn"
clippy.option_as_ref_cloned = "warn"
clippy.pathbuf_init_then_push = "warn"
clippy.path_buf_push_overwrite = "warn"
clippy.print_stderr = "warn"
clippy.print_stdout = "warn"
clippy.pub_underscore_fields = "warn"
clippy.question_mark = "warn"
clippy.range_minus_one = "warn"
clippy.range_plus_one = "warn"
clippy.redundant_clone = "warn"
clippy.redundant_else = "warn"
clippy.ref_binding_to_reference = "warn"
clippy.ref_option_ref = "warn"
clippy.same_functions_in_if_condition = "warn"
clippy.semicolon_if_nothing_returned = "warn"
clippy.set_contains_or_insert = "warn"
clippy.stable_sort_primitive = "warn"
clippy.string_add_assign = "warn"
clippy.string_slice = "warn"
clippy.suspicious_operation_groupings = "warn"
clippy.suspicious_xor_used_as_pow = "warn"
clippy.todo = "warn"
clippy.trait_duplication_in_bounds = "warn"
clippy.trivial_regex = "warn"
clippy.type_repetition_in_bounds = "warn"
clippy.unimplemented = "warn"
clippy.uninlined_format_args = "warn"
clippy.unnecessary_box_returns = "warn"
clippy.unnecessary_join = "warn"
clippy.unnecessary_wraps = "warn"
clippy.unnested_or_patterns = "warn"
clippy.unused_async = "warn"
clippy.unused_result_ok = "warn"
clippy.unused_rounding = "warn"
clippy.unused_self = "warn"
clippy.unwrap_used = "warn"
clippy.used_underscore_binding = "warn"
clippy.useless_let_if_seq = "warn"
clippy.use_self = "warn"
clippy.verbose_file_reads = "warn"
clippy.wildcard_imports = "warn"