[package]
name = "emulator"
version = "0.1.0"
edition = "2024"
default-run = "dsa"

[lib]
name = "dsa_rs"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "dsa"
path = "src/main.rs"
required-features = ["config"]

[dependencies]
common = { path = "../core/dsa_common" }
assembler = { path = "../core/assembler" }
compiler = { path = "../core/compiler" }
dsa_editor = { path = "./dsa_editor" }

egui = "0.31.1"
dirs = "6.0.0"
discord-presence = { version = "2.0.0", optional = true }
toml = { version = "0.8.23", optional = true }
serde = { version = "1.0.219", features = ["derive"], optional = true }
egui_file = "0.22.1"
rustc-hash = "2.1.1"

[features]
default = ["config"]
discord-rpc = ["dep:discord-presence"]
config = ["dep:toml", "dep:serde"]

# Add support for Android for the fun of it. Currently crashes lol.
[target.'cfg(target_os = "android")'.dependencies]
winit = { version = "0.30.11", features = ["android-native-activity"] }
# jni = "0.21.1"

[target.'cfg(target_os = "android")'.dependencies.eframe]
version = "0.31.1"
features = ["android-native-activity"]

[target.'cfg(not(target_os = "android"))'.dependencies.eframe]
version = "0.31.1"
