/
Cargo.toml
249 lines (232 loc) · 11 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
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
[workspace]
members = [
"all-is-cubes",
"all-is-cubes-base",
"all-is-cubes-content",
"all-is-cubes-desktop",
"all-is-cubes-gpu",
"all-is-cubes-mesh",
"all-is-cubes-port",
"all-is-cubes-server",
"all-is-cubes-ui",
"test-renderers",
"tools/xtask",
# Workspaces generally expect to be able to compile everything for the same target,
# but all-is-cubes-wasm only compiles on wasm and all-is-cubes-desktop doesn't.
# Specific advantages:
# * The wasm workspace has Cargo config telling it to be built for wasm32-unknown-unknown,
# which rust-analyzer picks up, so all IDE assistance works.
#
# Disadvantages, or advantages of the alternative of merely `cfg`-disabling all the wasm-only
# code:
# * `cargo fmt`, `cargo tree`, etc. don't work on this code (but `xtask` provides
# all-workspaces commands).
#
# "all-is-cubes-wasm",
# Including this makes the fuzz targets automatically built so we know they aren't broken.
# But, `cargo test` sometimes ignores `[[bin]] test = false` directives,
# https://github.com/rust-lang/cargo/issues/8338
# so doing this causes test failures in thise circumstances.
# As a substitute, I've included explicitly building the fuzz targets in the `xtask` build process.
#
# "fuzz",
]
# Use feature resolver version 2 (latest). (This must be specified explicitly
# in a workspace, but would be implicit in a single package with edition="2021".)
resolver = "2"
[workspace.dependencies]
all-is-cubes = { path = "all-is-cubes", version = "0.7.1", default-features = false }
all-is-cubes-base = { path = "all-is-cubes-base", version = "0.7.1", default-features = false }
all-is-cubes-content = { path = "all-is-cubes-content", version = "0.7.0", default-features = false }
all-is-cubes-desktop = { path = "all-is-cubes-desktop", version = "0.7.0", default-features = false }
all-is-cubes-gpu = { path = "all-is-cubes-gpu", version = "0.7.0", default-features = false }
all-is-cubes-mesh = { path = "all-is-cubes-mesh", version = "0.7.0", default-features = false }
all-is-cubes-port = { path = "all-is-cubes-port", version = "0.7.0", default-features = false }
all-is-cubes-server = { path = "all-is-cubes-server", version = "0.7.0", default-features = false }
all-is-cubes-ui = { path = "all-is-cubes-ui", version = "0.7.0", default-features = false }
allocation-counter = "0.8.1"
anyhow = "1.0.70"
# Each use should be { optional = true }.
arbitrary = { version = "1.1.6", features = ["derive"] }
arrayvec = { version = "0.7.4", default-features = false }
async_fn_traits = "0.1.1"
base64 = { version = "0.21.0", default-features = false }
bitflags = { version = "2.4", default-features = false }
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
# Note that this excludes the "derive" feature but some crates need it.
bytemuck = { version = "1.13.1", default-features = false }
cfg-if = { version = "1.0.0" }
# When upgrading clap, beware text output changes causing integration tests to fail.
clap = { version = "4.2.4", default-features = false, features = ["cargo", "deprecated", "derive", "help", "std", "suggestions", "usage", "wrap_help"] }
# Note: async_tokio feature is not needed globally but is enabled to avoid compiling two versions
# when benching/testing specific packages
criterion = { version = "0.5.1", features = ["async_tokio", "cargo_bench_support", "html_reports"] }
displaydoc = { version = "0.2.4", default-features = false}
either = { version = "1.10.0", default-features = false }
embedded-graphics = "0.8.0"
euclid = { version = "0.22.10", default-features = false }
exhaust = { version = "0.1.0", default-features = false }
flume = { version = "0.11.0", default-features = false, features = ["async"] }
futures-channel = { version = "0.3.28", default-features = false, features = ["alloc"] }
futures-core = { version = "0.3.28", default-features = false, features = ["alloc"] }
futures-task = { version = "0.3.28", default-features = false }
futures-util = { version = "0.3.28", default-features = false, features = ["alloc"] }
gilrs = { version = "0.10.4" }
gloo-timers = { version = "0.3.0", default-features = false }
hashbrown = { version = "0.14.0", default-features = false, features = ["ahash", "inline-more"] }
image = { version = "0.24.6", default-features = false }
indoc = "2.0.1"
itertools = { version = "0.12.0", default-features = false, features = ["use_alloc"] }
log = { version = "0.4.17", default-features = false }
macro_rules_attribute = "0.2.0"
manyfmt = "0.1.0"
mutants = "0.0.3"
num-traits = { version = "0.2.19", default-features = false }
once_cell = "1.19.0"
ordered-float = { version = "4.2.0", default-features = false }
paste = "1.0.12"
pollster = { version = "0.3.0", default-features = false }
polonius-the-crab = { version = "0.4.1" }
pretty_assertions = "1.2.0"
rand = { version = "0.8.3", default-features = false }
rand_xoshiro = "0.6.0"
rayon = { version = "1.8.0" }
re_log_types = { version = "0.16.0", default-features = false }
re_sdk = { version = "0.16.0", default-features = false }
re_types = { version = "0.16.0", default-features = false }
rendiff = { version = "0.1.0" }
scopeguard = { version = "1.2.0", default-features = false }
send_wrapper = { version = "0.6.0", features = ["futures"] }
serde = { version = "1.0.160", default-features = false, features = ["derive"] }
serde_json = "1.0.79"
simplelog = { version = "0.12.0", default-features = false, features = ["local-offset"] }
snapbox = "0.5.9" # keep in sync with `trycmd`
strum = { version = "0.26.1", default-features = false, features = ["derive"] }
sync_wrapper = { version = "1.0.0", default-features = false }
tempfile = "3.3.0"
thiserror = "1.0.56"
# Tokio is used for async test-running and for certain binaries.
# The library crates do not require Tokio.
tokio = { version = "1.28.0", default-features = false }
trycmd = "0.15.0" # keep in sync with `snapbox`
unicode-segmentation = { version = "1.10.1", default-features = false }
wasm-bindgen-futures = "0.4.40"
web-time = "1.0.0"
wgpu = { version = "0.19.3", default-features = false, features = ["wgsl"] }
yield-progress = { version = "0.1.6", default-features = false }
# Note: Lints are also necessarily redefined in the workspaces other than this one.
[workspace.lints]
# rustc lints that are set to deny
rust.rust_2018_idioms = { level = "deny", priority = -1 }
rust.unsafe_op_in_unsafe_fn = "deny"
# rustc lints that are set to warn
rust.explicit_outlives_requirements = "warn"
rust.missing_debug_implementations = "warn"
rust.missing_docs = "warn"
rust.noop_method_call = "warn"
rust.trivial_casts = "warn"
rust.trivial_numeric_casts = "warn"
rust.unused_extern_crates = "warn"
rust.unused_lifetimes = "warn"
rust.unused_qualifications = "warn"
# This lint has false positives on dev-dependencies. Occasionally turn it on to audit non-dev deps.
# rust.unused_crate_dependencies = "warn"
# clippy default lints that are set to allow
clippy.collapsible_else_if = "allow"
clippy.collapsible_if = "allow"
clippy.match_ref_pats = "allow"
clippy.needless_update = "allow"
clippy.single_match = "allow"
# clippy::pedantic lints that are set to allow
clippy.cast_possible_truncation = "allow" # consider enabling
clippy.cast_possible_wrap = "allow" # consider enabling
clippy.cast_precision_loss = "allow" # consider enabling
clippy.cast_sign_loss = "allow" # consider enabling
clippy.default_trait_access = "allow"
clippy.enum_glob_use = "allow"
clippy.explicit_iter_loop = "allow" # I prefer the opposite style
clippy.float_cmp = "allow"
clippy.from_iter_instead_of_collect = "allow" # <https://github.com/rust-lang/rust-clippy/issues/7213>
clippy.if_not_else = "allow"
clippy.inline_always = "allow"
clippy.items_after_statements = "allow" # we use this sparingly
clippy.manual_assert = "allow"
clippy.many_single_char_names = "allow"
clippy.match_bool = "allow"
clippy.match_same_arms = "allow"
clippy.missing_errors_doc = "allow" # consider enabling
clippy.missing_panics_doc = "allow" # consider enabling
clippy.module_name_repetitions = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/8524>
clippy.must_use_candidate = "allow" # consider enabling
clippy.no_effect_underscore_binding = "allow"
clippy.range_plus_one = "allow" # https://github.com/rust-lang/rust-clippy/issues/3307
clippy.redundant_closure_for_method_calls = "allow" # consider enabling
clippy.redundant_else = "allow"
clippy.semicolon_if_nothing_returned = "allow"
clippy.similar_names = "allow"
clippy.single_match_else = "allow"
clippy.struct_excessive_bools = "allow"
clippy.too_many_lines = "allow"
clippy.unreadable_literal = "allow"
clippy.wildcard_imports = "allow" # we use this sparingly
# clippy::restriction lints that are set to allow (to note why we aren't using them)
clippy.shadow_unrelated = "allow" # would use except for <https://github.com/rust-lang/rust-clippy/issues/10780>
# clippy lints that are set to deny
clippy.should_panic_without_expect = "deny"
# clippy lints that are set to warn
clippy.pedantic = { level = "warn", priority = -1 }
clippy.assigning_clones = "warn"
clippy.cast_lossless = "warn"
clippy.doc_markdown = "warn"
clippy.exhaustive_enums = "warn"
clippy.exhaustive_structs = "warn"
clippy.into_iter_without_iter = "warn"
clippy.inconsistent_struct_constructor = "warn"
clippy.infinite_loop = "warn"
clippy.iter_without_into_iter = "warn"
clippy.large_futures = "warn"
clippy.large_stack_frames = "warn"
clippy.manual_let_else = "warn"
clippy.map_unwrap_or = "warn"
clippy.missing_fields_in_debug = "warn"
clippy.modulo_arithmetic = "warn"
clippy.needless_pass_by_value = "warn"
clippy.option_as_ref_cloned = "warn"
clippy.pub_without_shorthand = "warn"
clippy.return_self_not_must_use = "warn"
clippy.suboptimal_flops = "warn"
clippy.trivially_copy_pass_by_ref = "warn"
clippy.undocumented_unsafe_blocks = "warn"
clippy.uninlined_format_args = "warn"
clippy.unnecessary_self_imports = "warn"
clippy.unnecessary_wraps = "warn"
clippy.unused_async = "warn"
clippy.wrong_self_convention = "warn"
[profile.dev]
# Enable some optimization to improve interactive performance in manual testing/experimenting.
# In particular, inlining is crucial.
opt-level = 2
# Yes, this is the default for dev, but I want to be precise here: overflow checks are enabled
# for ALL profiles. (Because not catching overflows in release mode is unwise when this is
# precisely where the program is *likely to encounter bigger numbers than in testing*.)
overflow-checks = true
# Faster builds at the cost of pathname-sensitive debug info.
# TODO: Disabled for <https://github.com/rust-lang/rust/issues/103976> in CI
# split-debuginfo = "unpacked"
# For packages whose code is not as performance-critical, spend less time optimizing
package.all-is-cubes-content.opt-level = 1
package.all-is-cubes-port.opt-level = 1
package.all-is-cubes-server.opt-level = 1
package.all-is-cubes-ui.opt-level = 1
package.test-renderers.opt-level = 1
[profile.release]
# TODO: review recommended options for wasm releases
overflow-checks = true
[profile.test]
overflow-checks = true
[profile.bench]
overflow-checks = true
[patch.crates-io]
# Here are some patches we might want to apply for development:
#
# wgpu = { git = "https://github.com/gfx-rs/wgpu/", branch = "trunk" }