[package]
authors.workspace = true
categories.workspace = true
description = "Four🍀bar GUI is a simulator, a synthesis tool for four-bar linkages."
edition.workspace = true
keywords.workspace = true
license.workspace = true
name = "four-bar-ui"
readme = "../README.md"
repository.workspace = true
version.workspace = true

[[bin]]
name = "four-bar"
path = "src/main.rs"

[features]
# Turn off the default "native" in WASM
# Turn on "native-win-release" to hide the console in Windows
default = ["native"]
native = ["four-bar/clap", "four-bar/rayon", "image/rayon"]
native-win-release = ["winapi", "native"]

[dependencies]
eframe = { version = "0.29", default-features = false, features = [
    "accesskit",
    "persistence",
    "glow",
] }
egui_plot = "0.29"
four-bar = { path = "../four-bar", version = "7", features = [
    "csv",
    "atlas",
    "plot",
] }
image = { version = "0.25", default-features = false, features = [
    "ico",
    "jpeg",
    "gif",
] }
rfd = "0.15"
ron = { git = "https://github.com/ron-rs/ron" }
serde = { version = "1", features = ["derive"] }
smartcore = { version = "0.3", features = ["ndarray-bindings"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# native here!
clap = { version = "4", features = ["derive"] }
indicatif = { version = "0.17", features = ["improved_unicode"] }
wild = "2"

[target.'cfg(target_arch = "wasm32")'.dependencies]
# wasm here!
console_error_panic_hook = "0.1"
instant = { version = "0.1", features = ["wasm-bindgen"] }
tracing-wasm = "0.2"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = "0.3.70"

[target.'cfg(windows)'.dependencies]
# windows here!
winapi = { version = "0.3", features = ["wincon", "winuser"], optional = true }

[target.'cfg(windows)'.build-dependencies]
image = "0.25"
winres = "0.1"

[lints]
workspace = true
