[package]
name = "sylpheed-viewer"
description = "Bevy-based asset viewer for Project Sylpheed: Arc of Deception"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true

# Native binary entry point
[[bin]]
name = "sylpheed-viewer"
path = "src/main.rs"

# Library crate — also serves as the WASM entry point
[lib]
name = "sylpheed_viewer"
path = "src/lib.rs"
# cdylib is required for wasm-bindgen to produce a .wasm file
crate-type = ["cdylib", "rlib"]

[dependencies]
sylpheed-formats = { workspace = true }

bevy = { workspace = true, features = [
    "bevy_asset",
    "bevy_color",
    "bevy_core_pipeline",
    "bevy_pbr",
    "bevy_render",
    "bevy_window",
    "bevy_winit",
    "multi_threaded",
    "png",
    # Required for TonyMcMapFace tonemapping (default Camera3d tonemapper)
    "tonemapping_luts",
    # Linux display backends
    "x11",
    "wayland",
] }
bevy_egui  = { workspace = true }
futures    = { workspace = true }

thiserror  = { workspace = true }
tracing    = { workspace = true }

[features]
# Enable Bevy dynamic linking for faster incremental recompiles in dev
dev = ["bevy/dynamic_linking"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tracing-subscriber = { workspace = true }
rfd                = { workspace = true }
# Audio for the WMV video player (pulls cpal → alsa on Linux).
rodio              = { workspace = true }
# PNG decode for pak image entries (pure Rust; Bevy already pulls it in).
image              = { version = "0.25", default-features = false, features = ["png"] }
# Off-thread rasterization of embedded-font samples (avoids egui's global fonts).
ab_glyph           = "0.2"
