fork/livesplit-core

git clone https://git.julia.blue/fork/livesplit-core

Christopher SerrRemove some features from `time` (#571)0fefb75

master
5.2 KiB187 linesraw
1[package]
2name = "livesplit-core"
3version = "0.12.0"
4authors = ["Christopher Serr <christopher.serr@gmail.com>"]
5documentation = "https://docs.rs/livesplit-core/"
6repository = "https://github.com/LiveSplit/livesplit-core"
7license = "Apache-2.0/MIT"
8description = "livesplit-core is a library that provides a lot of functionality for creating a speedrun timer."
9readme = "README.md"
10keywords = ["speedrun", "timer", "livesplit", "gaming"]
11categories = ["no-std", "date-and-time"]
12include = [
13    # FIXME: We technically don't want to publish the benches, as they rely on
14    # the tests folder, but otherwise crater can't compile us, as these benches
15    # are referenced in the Cargo.toml.
16    "/benches/*",
17    "/src/*",
18    "/Cargo.toml",
19    "/CHANGELOG.md",
20    "/CODE_OF_CONDUCT.md",
21    "/LICENSE-APACHE",
22    "/LICENSE-MIT",
23    "/README.md",
24]
25edition = "2021"
26resolver = "2"
27rust-version = "1.63"
28
29[package.metadata.docs.rs]
30all-features = true
31
32[workspace]
33members = ["capi", "capi/bind_gen", "crates/*"]
34
35[dependencies]
36# core
37base64 = { version = "0.13.0", default-features = false, features = ["alloc"] }
38bytemuck = { version = "1.9.1", default-features = false, features = ["derive"] }
39cfg-if = "1.0.0"
40time = { version = "0.3.3", default-features = false }
41hashbrown = "0.12.0"
42libm = "0.2.1"
43livesplit-hotkey = { path = "crates/livesplit-hotkey", version = "0.6.0", default-features = false }
44livesplit-title-abbreviations = { path = "crates/livesplit-title-abbreviations", version = "0.2.0" }
45memchr = { version = "2.3.4", default-features = false }
46simdutf8 = { version = "0.1.4", default-features = false, features = ["aarch64_neon"] }
47serde = { version = "1.0.98", default-features = false, features = [
48    "alloc",
49    "derive",
50] }
51serde_json = { version = "1.0.60", default-features = false, features = ["alloc"] }
52smallstr = { version = "0.3.0", default-features = false }
53snafu = { version = "0.7.0", default-features = false }
54unicase = "2.6.0"
55
56# std
57image = { version = "0.24.0", features = [
58    "png",
59], default-features = false, optional = true }
60
61# Rendering
62# Currently doesn't require any additional dependencies.
63
64# Path-based Text Engine
65rustybuzz = { version = "0.5.1", default-features = false, features = [
66    "libm",
67], optional = true }
68ttf-parser = { version = "0.15.0", default-features = false, optional = true }
69
70# Font Loading
71font-kit = { version = "0.11.0", optional = true }
72
73# Software Rendering
74tiny-skia = { version = "0.8.1", default-features = false, features = [
75    "no-std-float",
76    "simd",
77], optional = true }
78
79# Networking
80splits-io-api = { version = "0.2.0", optional = true }
81
82# Auto Splitting
83livesplit-auto-splitting = { path = "crates/livesplit-auto-splitting", version = "0.1.0", optional = true }
84tokio = { version = "1.17.0", default-features = false, features = [
85    "rt",
86    "sync",
87    "time",
88], optional = true }
89log = { version = "0.4.14", default-features = false, optional = true }
90
91[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
92# WebAssembly in the Web
93js-sys = { version = "0.3.55", optional = true }
94wasm-bindgen = { version = "0.2.78", optional = true }
95web-sys = { version = "0.3.28", default-features = false, features = [
96    "Performance",
97    "Window",
98], optional = true }
99
100[target.'cfg(windows)'.dependencies]
101# We need winapi to use GDI to resolve fonts on Windows.
102winapi = { version = "0.3.9", features = ["wingdi"], optional = true }
103
104[target.'cfg(any(target_os = "linux", target_os = "l4re", target_os = "android", target_os = "macos", target_os = "ios"))'.dependencies]
105# We need libc for our own implementation of Instant
106libc = { version = "0.2.101", optional = true }
107
108[dev-dependencies]
109img_hash = "3.1.0"
110
111[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
112criterion = "0.4.0"
113
114[features]
115default = ["image-shrinking", "std"]
116std = [
117    "image",
118    "libc",
119    "livesplit-hotkey/std",
120    "memchr/std",
121    "rustybuzz?/std",
122    "serde/std",
123    "serde_json/std",
124    "simdutf8/std",
125    "snafu/std",
126    "time/formatting",
127    "time/local-offset",
128    "tiny-skia?/std",
129    "ttf-parser?/std",
130    "winapi",
131]
132more-image-formats = [
133    "image?/bmp",
134    "image?/farbfeld",
135    "image?/hdr",
136    "image?/ico",
137    "image?/jpeg",
138    "image?/pnm",
139    "image?/tga",
140    "image?/tiff",
141    "image?/webp",
142]
143image-shrinking = ["std", "more-image-formats"]
144rendering = ["more-image-formats", "image?/gif"]
145path-based-text-engine = ["rendering", "rustybuzz", "ttf-parser"]
146font-loading = ["std", "path-based-text-engine", "font-kit"]
147software-rendering = ["path-based-text-engine", "tiny-skia"]
148wasm-web = [
149    "std",
150    "js-sys",
151    "livesplit-hotkey/wasm-web",
152    "wasm-bindgen",
153    "web-sys",
154]
155networking = ["std", "splits-io-api"]
156auto-splitting = ["std", "livesplit-auto-splitting", "tokio", "log"]
157unstable-auto-splitting = ["livesplit-auto-splitting?/unstable"]
158
159[lib]
160bench = false
161
162[[bench]]
163name = "balanced_pb"
164harness = false
165
166[[bench]]
167name = "layout_state"
168harness = false
169
170[[bench]]
171name = "parsing"
172harness = false
173
174[[bench]]
175name = "scene_management"
176harness = false
177
178[[bench]]
179name = "software_rendering"
180harness = false
181
182[profile.release]
183lto = true
184panic = "abort"
185
186[profile.release.build-override]
187opt-level = 0