[package]
name = "inkr"
version = "1.0.0"
authors = []
edition = "2024"

[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]

[features]
pinenote = []

[dependencies]
egui = "0.31"
egui_extras = { version = "0.31", features = ["svg"] }
eframe = { version = "0.31", default-features = false, features = [
    "glow",           # alt: "wgpu".
    "persistence",
    "wayland",
] }
log = "0.4.27"
serde = { version = "1.0.219", features = ["derive"] }
egui_glow = "0.31.1"
rfd = { version = "0.15.3", default-features = false, features = ["gtk3"] }
rand = "0.9.1"
eyre = "0.6.12"
half = "2.6.0"
zerocopy = { version = "0.8.25", features = ["derive", "std"] }
base64 = "0.22.1"
chrono = { version = "0.4.41", features = ["serde"] }
notify = "8.1.0"
arboard = "3.6.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = "0.11.8"
rand = "0.9.1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.3", features = ["wasm_js"] }
wasm-bindgen-futures = "0.4.50"
web-sys = "0.3.77"

[patch.crates-io]
egui =   { git = "https://github.com/emilk/egui", rev = "f2ce6424f3a32f47308fb9871d540c01377b2cd9" }
eframe = { git = "https://github.com/emilk/egui", rev = "f2ce6424f3a32f47308fb9871d540c01377b2cd9" }

[dev-dependencies]
insta = { version = "1.43.1", features = ["yaml"] }
# egui = { path = "../egui/crates/egui" }
# eframe = { path = "../egui/crates/eframe" }

[profile.release]
opt-level = 2 # fast and small wasm

[profile.dev.package."*"]
opt-level = 2 # optimize dependencies in debug-builds
