[workspace]
members = [
    "core",
    "lib/common",
    "lib/frontend/frontend_common",
    "lib/frontend/videocard_renderer",
    "lib/frontend/marty_scaler_wgpu",
    "lib/frontend/display_manager_wgpu",
    "lib/frontend/marty_egui",
    "lib/frontend/config_toml_bpaf",
    "frontends/martypc_web_player_wgpu",
    "frontends/martypc_desktop_wgpu"
]

[workspace.package]
version = "0.2.3"
edition = "2021"
rust-version = "1.76"
license = "MIT"
authors = ["Daniel Balsom"]

[package]
name = "martypc"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true

[[bin]]
name = "martypc"
path = "frontends/martypc_desktop_wgpu/src/main.rs"

[dependencies]
marty_core = { path = "core"}
videocard_renderer = { path = "lib/frontend/videocard_renderer" }
marty_egui = { path = "lib/frontend/marty_egui" }
frontend_common = { path = "lib/frontend/frontend_common" }
martypc_desktop_wgpu = { path = "frontends/martypc_desktop_wgpu" }

[workspace.dependencies]
winit = "0.29.4"
wgpu = "0.19.4"
bytemuck = "1.14"
raw-window-handle = "0.5.0"
thiserror = "1.0.37"
anyhow = "1.0"
log = "0.4.20"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serialport = { git = "https://github.com/dbalsom/serialport-rs", branch = "arduino-fix" }
web-time = "0.2.4"
toml = "0.8"
fxhash = "0.2.1"
enum_dispatch = "0.3.13"
indexmap = "2.2.6"

egui = "0.27.2"
egui-wgpu = "0.27.2"
egui_plot = "0.27.2"

[workspace.dependencies.egui-winit]
version = "0.27.2"
#branch = "0_24_2_winit_0_29_15"
default-features = false
features = ["clipboard", "wayland", "x11"]

[workspace.dependencies.egui_extras]
version = "0.27.2"
#branch = "0_24_2_winit_0_29_15"
features = ["image"]


[workspace.dependencies.image]
version = "0.24"
default-features = false
features = ["png"]

[workspace.dependencies.pixels]
git = "https://github.com/dbalsom/pixels_martypc.git"
branch = "marty_update_deps3"


#[workspace.dependencies.egui]
#git = "https://github.com/dbalsom/egui_martypc.git"
#branch = "0_24_2_winit_0_29_15"
#
#[workspace.dependencies.egui-wgpu]
#git = "https://github.com/dbalsom/egui_martypc.git"
#branch = "0_24_2_winit_0_29_15"
#
#[workspace.dependencies.egui-winit]
#git = "https://github.com/dbalsom/egui_martypc.git"
#branch = "0_24_2_winit_0_29_15"
#default-features = false
#features = ["clipboard", "wayland", "x11"]
#
#[workspace.dependencies.egui_extras]
#git = "https://github.com/dbalsom/egui_martypc.git"
#branch = "0_24_2_winit_0_29_15"
#features = ["image"]
#
#[workspace.dependencies.egui_plot]
#git = "https://github.com/dbalsom/egui_martypc.git"
#branch = "0_24_2_winit_0_29_15"

[profile.release]
opt-level = 3

[profile.release-lto]
inherits = "release"
lto = true
strip = true
opt-level = 3

[profile.dev.package."*"]
opt-level = 3

[features]
default = ["ega"]
devtools = ["martypc_desktop_wgpu/devtools"]
arduino_validator = ["marty_core/arduino_validator", "martypc_desktop_wgpu/arduino_validator"]
cpu_validator = ["marty_core/cpu_validator", "martypc_desktop_wgpu/cpu_validator"]
ega = ["marty_core/ega", "frontend_common/ega", "videocard_renderer/ega"]
vga = ["marty_core/vga", "frontend_common/vga"]

[build-dependencies]
winres = "0.1"

[package.metadata.appimage]
assets = [
    "install/martypc.toml",
    "install/configs",
    "install/media",
    "install/output",
]
auto_link = true
auto_link_exclude_list = [
    "libc.so*",
    "libdl.so*",
    "libpthread.so*",
]

