forked from LiveSplit/livesplit-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
188 lines (164 loc) · 5.21 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
[package]
name = "livesplit-core"
version = "0.12.0"
authors = ["Christopher Serr <[email protected]>"]
documentation = "https://docs.rs/livesplit-core/"
repository = "https://github.com/LiveSplit/livesplit-core"
license = "Apache-2.0/MIT"
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.63"
[package.metadata.docs.rs]
all-features = true
[workspace]
members = ["capi", "capi/bind_gen", "crates/*"]
[dependencies]
# core
base64 = { version = "0.13.0", default-features = false, features = ["alloc"] }
bytemuck = { version = "1.9.1", default-features = false, features = ["derive"] }
cfg-if = "1.0.0"
itoa = { version = "1.0.3", default-features = false }
time = { version = "0.3.3", default-features = false }
hashbrown = "0.12.0"
libm = "0.2.1"
livesplit-hotkey = { path = "crates/livesplit-hotkey", version = "0.6.0", default-features = false }
livesplit-title-abbreviations = { path = "crates/livesplit-title-abbreviations", version = "0.2.0" }
memchr = { version = "2.3.4", default-features = false }
simdutf8 = { version = "0.1.4", default-features = false, features = ["aarch64_neon"] }
serde = { version = "1.0.98", default-features = false, features = [
"alloc",
"derive",
] }
serde_json = { version = "1.0.60", default-features = false, features = ["alloc"] }
smallstr = { version = "0.3.0", default-features = false }
snafu = { version = "0.7.0", default-features = false }
unicase = "2.6.0"
# std
image = { version = "0.24.0", features = [
"png",
], default-features = false, optional = true }
# Rendering
# Currently doesn't require any additional dependencies.
# Path-based Text Engine
rustybuzz = { version = "0.5.1", default-features = false, features = [
"libm",
], optional = true }
ttf-parser = { version = "0.15.0", default-features = false, optional = true }
# Font Loading
font-kit = { version = "0.11.0", optional = true }
# Software Rendering
tiny-skia = { version = "0.8.1", default-features = false, features = [
"no-std-float",
"simd",
], optional = true }
# Networking
splits-io-api = { version = "0.2.0", optional = true }
# Auto Splitting
livesplit-auto-splitting = { path = "crates/livesplit-auto-splitting", version = "0.1.0", optional = true }
tokio = { version = "1.17.0", default-features = false, features = [
"rt",
"sync",
"time",
], optional = true }
log = { version = "0.4.14", default-features = false, optional = true }
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
# WebAssembly in the Web
js-sys = { version = "0.3.55", optional = true }
wasm-bindgen = { version = "0.2.78", optional = true }
web-sys = { version = "0.3.28", default-features = false, features = [
"Performance",
"Window",
], optional = true }
[target.'cfg(windows)'.dependencies]
# We need winapi to use GDI to resolve fonts on Windows.
winapi = { version = "0.3.9", features = ["wingdi"], optional = true }
[target.'cfg(any(target_os = "linux", target_os = "l4re", target_os = "android", 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]
img_hash = "3.1.0"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4.0"
[features]
default = ["image-shrinking", "std"]
std = [
"image",
"libc",
"livesplit-hotkey/std",
"memchr/std",
"rustybuzz?/std",
"serde/std",
"serde_json/std",
"simdutf8/std",
"snafu/std",
"time/formatting",
"time/local-offset",
"tiny-skia?/std",
"ttf-parser?/std",
"winapi",
]
more-image-formats = [
"image?/bmp",
"image?/farbfeld",
"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"]
path-based-text-engine = ["rendering", "rustybuzz", "ttf-parser"]
font-loading = ["std", "path-based-text-engine", "font-kit"]
software-rendering = ["path-based-text-engine", "tiny-skia"]
wasm-web = [
"std",
"js-sys",
"livesplit-hotkey/wasm-web",
"wasm-bindgen",
"web-sys",
]
networking = ["std", "splits-io-api"]
auto-splitting = ["std", "livesplit-auto-splitting", "tokio", "log"]
unstable-auto-splitting = ["livesplit-auto-splitting?/unstable"]
[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
[profile.release]
lto = true
panic = "abort"
[profile.release.build-override]
opt-level = 0