[package] name = "livesplit-core" version = "0.12.0" authors = ["Christopher Serr "] 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" 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