forked from Astrabit-ST/Luminol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
313 lines (250 loc) · 8.14 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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# As much as I would like to move the luminol package into the crates folder, trunk won't let me :(
# It wants a root package, and it has to be this
[package]
name = "luminol"
description = "Luminol is a FOSS recreation of RPG Maker XP in Rust with love ❤️"
build = "build.rs"
version.workspace = true
authors.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
readme.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
# Setup various shared workspace values
[workspace]
members = ["crates/*"]
resolver = "2"
[workspace.lints.rust]
rust_2018_idioms = "warn"
# unsafe code is sometimes fine but in general we don't want to use it.
unsafe_code = "warn"
# clearly denote where you are using unsafe code in unsafe fns. in a future rust edition this will become a hard error.
unsafe_op_in_unsafe_fn = "forbid"
# will become a hard error in a future rust edition
elided_lifetimes_in_paths = "forbid"
[workspace.lints.clippy]
all = "warn"
# we should turn these on in the future to avoid possible crashes
# panic = "warn"
# panic_in_result_fn = "warn"
# panicking_unwrap = "warn"
unnecessary_wraps = "warn"
missing_errors_doc = "allow"
doc_markdown = "allow"
missing_panics_doc = "allow"
too_many_lines = "allow"
# you must provide a safety doc.
missing_safety_doc = "warn"
[workspace.package]
version = "0.4.0"
authors = [
"Lily Lyons <[email protected]>",
"Egor Poleshko <[email protected]>",
]
edition = "2021"
rust-version = "1.74"
license = "GPL-3.0"
readme = "README.md"
repository = "https://github.com/Speak2Erase/Luminol"
keywords = ["gamedev", "rpg", "rpg-maker"]
categories = ["games"]
# Shared dependencies
[workspace.dependencies]
egui = "0.27.2"
egui_extras = { version = "0.27.2", features = ["svg", "image"] }
epaint = "0.27.2"
luminol-eframe = { version = "0.4.0", path = "crates/eframe/", features = [
"wgpu",
"accesskit",
"persistence",
"default_fonts",
"x11",
"wayland",
], default-features = false }
luminol-egui-wgpu = { version = "0.4.0", path = "crates/egui-wgpu/" }
egui-winit = "0.27.2"
wgpu = { version = "0.19.1", features = ["naga-ir"] }
glam = { version = "0.24.2", features = ["bytemuck"] }
image = "0.24.7"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yml = "0.0.10"
alox-48 = { version = "0.6.0" }
ron = "0.8.1"
rust-ini = "0.20.0"
bytemuck = { version = "1.14.0", features = [
"extern_crate_alloc",
"derive",
"min_const_generics",
] }
tracing = "0.1.37"
strum = { version = "0.25.0", features = ["derive"] }
paste = "1.0.14"
thiserror = "1.0.37"
bitflags = "2.4.0"
color-eyre = "0.6.2"
puffin = "0.19"
raw-window-handle = "0.6.0"
winit = { version = "0.29.4", default-features = false }
log = { version = "0.4", features = ["std"] }
document-features = "0.2.8"
web-time = "0.2"
parking_lot = { version = "0.12.1", features = [
"nightly", # This is required for parking_lot to work properly in WebAssembly builds with atomics support
"deadlock_detection",
] }
once_cell = "1.18.0"
crossbeam = "0.8.2"
dashmap = "5.5.3"
flume = "0.11.0"
oneshot = "0.1.6"
futures-lite = "2.1.0"
async-std = "1.12.0"
pin-project = "1"
fragile = "2.0"
poll-promise = { version = "0.3.0" }
camino = "1.1.6"
slab = { version = "0.4.9", features = ["serde"] }
qp-trie = "0.8.2"
itertools = "0.11.0"
rfd = "0.12.0"
tempfile = "3.8.1"
rand = "0.8.5"
murmur3 = "0.5.2"
alacritty_terminal = "0.22.0"
luminol-audio = { version = "0.4.0", path = "crates/audio/" }
luminol-components = { version = "0.4.0", path = "crates/components/" }
luminol-config = { version = "0.4.0", path = "crates/config/" }
luminol-core = { version = "0.4.0", path = "crates/core/" }
luminol-data = { version = "0.4.0", path = "crates/data/" }
luminol-filesystem = { version = "0.4.0", path = "crates/filesystem/" }
luminol-graphics = { version = "0.4.0", path = "crates/graphics/" }
luminol-macros = { version = "0.4.0", path = "crates/macros/" }
luminol-proc-macros = { version = "0.4.0", path = "crates/proc-macros/" }
luminol-modals = { version = "0.4.0", path = "crates/modals/" }
luminol-term = { version = "0.4.0", path = "crates/term/" }
luminol-ui = { version = "0.4.0", path = "crates/ui/" }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
luminol-eframe.workspace = true
luminol-egui-wgpu.workspace = true
luminol-macros.workspace = true
egui.workspace = true
egui_extras.workspace = true
wgpu.workspace = true
rfd.workspace = true
parking_lot.workspace = true
once_cell.workspace = true
image.workspace = true
tracing-subscriber = "0.3.17"
color-eyre.workspace = true
luminol-audio.workspace = true
luminol-core.workspace = true
luminol-config.workspace = true
luminol-filesystem.workspace = true
luminol-graphics.workspace = true
luminol-ui.workspace = true
# luminol-windows = { version = "0.1.0", path = "../windows/" }
# luminol-tabs = { version = "0.1.0", path = "../tabs/" }
camino.workspace = true
strum.workspace = true
zstd = "0.13.0"
async-std.workspace = true
futures-lite.workspace = true
git-version = "0.3.9"
# Native
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
steamworks = { version = "0.10.0", optional = true }
tokio = { version = "1.33", features = [
"sync",
"macros",
"io-util",
"rt-multi-thread",
"parking_lot",
] } # *sigh*
tempfile.workspace = true
luminol-term.workspace = true
# Set poll promise features here based on the target
# I'd much rather do it in the workspace, but cargo doesn't support that yet
#
# Doing this also relies on a quirk of features, that any crate specifying features applies to ALL crates
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.poll-promise]
workspace = true
features = ["tokio"]
[target.'cfg(target_arch = "wasm32")'.dependencies.poll-promise]
workspace = true
features = ["web"]
# Web
# Look into somehow pinning these as workspace dependencies
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2.87"
wasm-bindgen-futures = "=0.4.40"
js-sys = "0.3"
oneshot.workspace = true
luminol-web = { version = "0.4.0", path = "crates/web/" }
tracing-wasm = "0.2"
tracing-log = "0.1.3"
tracing.workspace = true
web-sys = { version = "=0.3.67", features = [
"BeforeUnloadEvent",
"Window",
"Worker",
"WorkerOptions",
"WorkerType",
] }
[target.'cfg(target_arch = "wasm32")'.dependencies.wgpu]
workspace = true
features = ["webgpu", "webgl"]
[features]
steamworks = ["dep:steamworks"]
[target.'cfg(windows)'.build-dependencies]
winres = "0.1"
[package.metadata.winres]
OriginalFilename = "Luminol.exe"
ProductName = "Luminol"
# Fast and performant.
[profile.release]
opt-level = 3
# lto = "fat"
# debug = true
# Enable only a small amount of optimization in debug mode
[profile.dev]
opt-level = 1
# Enable max optimizations for certain dependencies, but not for our code
# These dependencies are "hot" in that they are used quite frequently
# Ui
[profile.dev.package.egui]
opt-level = 3
[profile.dev.package.luminol-eframe]
opt-level = 3
# Audio
[profile.dev.package.rodio]
opt-level = 3
[profile.dev.package.rustysynth]
opt-level = 3
# Graphics
[profile.dev.package.wgpu]
opt-level = 3
[profile.dev.package.image]
opt-level = 3
[profile.dev.package.glam]
opt-level = 3
# Backtraces for color-eyre errors and panics
[profile.dev.package.backtrace]
opt-level = 3
# See why config is set up this way.
# https://bevy-cheatbook.github.io/pitfalls/performance.html#why-not-use---release
[patch.crates-io]
# flume's global spinlock uses `thread::sleep` which doesn't work in the main thread in WebAssembly.
# This is a patched version with `thread::sleep` removed in WebAssembly builds.
# See https://github.com/zesterer/flume/issues/137.
flume = { git = "https://github.com/Astrabit-ST/flume", rev = "d323799efea329c87a3a5a5b45cc76f46da278c2" }
# If you want to use the bleeding edge version of egui and eframe:
# egui = { git = "https://github.com/emilk/egui", branch = "master" }
# eframe = { git = "https://github.com/emilk/egui", branch = "master" }
# If you fork https://github.com/emilk/egui you can test with:
# egui = { path = "../egui/crates/egui" }
# eframe = { path = "../egui/crates/eframe" }