-
Notifications
You must be signed in to change notification settings - Fork 58
/
Cargo.toml
227 lines (200 loc) · 6.19 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
[package]
name = "livesplit-core"
version = "0.13.0"
authors = ["Christopher Serr <[email protected]>"]
documentation = "https://docs.rs/livesplit-core/"
repository = "https://github.com/LiveSplit/livesplit-core"
license = "MIT OR Apache-2.0"
description = "livesplit-core is a library that provides a lot of functionality for creating a speedrun timer."
readme = "README.md"
keywords = ["speedrun", "timer", "livesplit", "gaming"]
categories = ["no-std", "date-and-time"]
include = [
# FIXME: We technically don't want to publish the benches, as they rely on
# the tests folder, but otherwise crater can't compile us, as these benches
# are referenced in the Cargo.toml.
"/benches/*",
"/src/*",
"/Cargo.toml",
"/CHANGELOG.md",
"/CODE_OF_CONDUCT.md",
"/LICENSE-APACHE",
"/LICENSE-MIT",
"/README.md",
]
edition = "2021"
resolver = "2"
rust-version = "1.82"
[package.metadata.docs.rs]
all-features = true
[workspace]
members = ["capi", "capi/bind_gen", "crates/*"]
[dependencies]
# core
base64-simd = { version = "0.8.0", default-features = false, features = [
"alloc",
] }
bytemuck = { version = "1.9.1", default-features = false }
bytemuck_derive = { version = "1.4.1", default-features = false }
cfg-if = "1.0.0"
itoa = { version = "1.0.3", default-features = false }
time = { version = "0.3.36", default-features = false }
hashbrown = "0.15.0"
libm = "0.2.1"
livesplit-hotkey = { path = "crates/livesplit-hotkey", version = "0.7.0", default-features = false }
livesplit-title-abbreviations = { path = "crates/livesplit-title-abbreviations", version = "0.3.0" }
memchr = { version = "2.3.4", default-features = false }
simdutf8 = { git = "https://github.com/CryZe/simdutf8", branch = "wasm-ub-panic", default-features = false, features = [
"aarch64_neon",
] }
serde = { version = "1.0.186", default-features = false, features = ["alloc"] }
serde_derive = { version = "1.0.186", default-features = false }
serde_json = { version = "1.0.60", default-features = false, features = [
"alloc",
] }
sha2 = { version = "0.10.8", default-features = false }
slab = { version = "0.4.9", default-features = false }
smallstr = { version = "0.3.0", default-features = false }
snafu = { version = "0.8.0", default-features = false }
# std
image = { version = "0.25.0", features = [
"png",
], default-features = false, optional = true }
# Rendering
# Currently doesn't require any additional dependencies.
# Default Text Engine
cosmic-text = { version = "0.12.1", default-features = false, features = [
"no_std",
], optional = true }
# Font Loading
# Currently doesn't require any additional dependencies.
# Software Rendering
tiny-skia = { version = "0.11.1", default-features = false, features = [
"no-std-float",
"simd",
], optional = true }
tiny-skia-path = { version = "0.11.1", default-features = false, optional = true }
# SVG Rendering
foldhash = { version = "0.1.3", default-features = false, optional = true }
# Networking
splits-io-api = { version = "0.4.0", optional = true }
# Auto Splitting
livesplit-auto-splitting = { path = "crates/livesplit-auto-splitting", version = "0.1.0", optional = true }
arc-swap = { version = "1.7.1", optional = true }
log = { version = "0.4.14", default-features = false, optional = true }
[target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies]
# WebAssembly in the Web
js-sys = { version = "0.3.55", optional = true }
wasm-bindgen = { version = "0.2.78", optional = true }
wasm-bindgen-futures = { version = "0.4.28", optional = true }
web-sys = { version = "0.3.28", default-features = false, features = [
"Document",
"Performance",
"VisibilityState",
"Window",
], optional = true }
[target.'cfg(windows)'.dependencies]
# We need windows-sys to use GDI to resolve fonts on Windows.
windows-sys = { version = "0.59.0", features = [
"Win32_Foundation",
"Win32_Graphics_Gdi",
], optional = true }
[target.'cfg(any(target_os = "linux", target_os = "l4re", target_os = "android", target_os = "fuchsia", target_os = "macos", target_os = "ios"))'.dependencies]
# We need libc for our own implementation of Instant
libc = { version = "0.2.101", optional = true }
[dev-dependencies]
seahash = "4.1.0"
[target.'cfg(windows)'.dev-dependencies]
winreg = "0.52.0"
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
criterion = "0.5.0"
[features]
default = ["image-shrinking", "std"]
std = [
"base64-simd/detect",
"base64-simd/std",
"foldhash?/std",
"image",
"libc",
"livesplit-hotkey/std",
"memchr/std",
"cosmic-text?/std",
"serde_json/std",
"serde/std",
"sha2/std",
"slab/std",
"simdutf8/std",
"snafu/std",
"time/local-offset",
"tiny-skia?/std",
"windows-sys",
]
more-image-formats = [
"image?/bmp",
"image?/ff",
"image?/hdr",
"image?/ico",
"image?/jpeg",
"image?/pnm",
"image?/tga",
"image?/tiff",
"image?/webp",
]
image-shrinking = ["std", "more-image-formats"]
rendering = ["more-image-formats", "image?/gif"]
default-text-engine = ["rendering", "cosmic-text"]
font-loading = ["std", "default-text-engine"]
software-rendering = ["default-text-engine", "tiny-skia", "tiny-skia-path"]
svg-rendering = ["default-text-engine", "foldhash"]
web-rendering = [
"wasm-web",
"rendering",
"wasm-bindgen-futures",
"web-sys/Blob",
"web-sys/CanvasGradient",
"web-sys/Document",
"web-sys/DomRect",
"web-sys/Element",
"web-sys/HtmlCanvasElement",
"web-sys/ImageBitmap",
"web-sys/Path2d",
"web-sys/TextMetrics",
]
wasm-web = [
"std",
"cosmic-text?/wasm-web",
"js-sys",
"livesplit-hotkey/wasm-web",
"wasm-bindgen",
"web-sys",
]
networking = ["std", "splits-io-api"]
auto-splitting = ["std", "livesplit-auto-splitting", "arc-swap", "log"]
[lib]
bench = false
[[bench]]
name = "balanced_pb"
harness = false
[[bench]]
name = "layout_state"
harness = false
[[bench]]
name = "parsing"
harness = false
[[bench]]
name = "scene_management"
harness = false
[[bench]]
name = "software_rendering"
harness = false
[[bench]]
name = "svg_rendering"
harness = false
[profile.max-opt]
inherits = "release"
lto = true
panic = "abort"
codegen-units = 1
strip = true
[profile.max-opt.build-override]
opt-level = 0