[package]
name = "nightshade"
version.workspace = true
authors.workspace = true
description = "A cross-platform data-oriented game engine."
readme = "README.md"
homepage.workspace = true
repository.workspace = true
keywords = ["gamedev", "engine", "ecs", "wgpu", "webgpu"]
license.workspace = true
edition.workspace = true
rust-version.workspace = true

[features]
default = ["wgpu"]
wgpu = ["dep:wgpu", "dep:egui-wgpu", "wgpu/dx12", "wgpu/metal", "wgpu/vulkan", "wgpu/webgpu"]
openxr = ["dep:openxr", "dep:ash", "dep:wgpu-hal", "dep:gpu-allocator", "wgpu/vulkan"]

[dependencies]
bitflags = { workspace = true }
bytemuck = { workspace = true }
egui = { workspace = true }
egui_extras = { workspace = true }
fontdue = "0.8"
freecs = { workspace = true }
getrandom = { version = "0.3", features = ["wasm_js"] }
gilrs = { workspace = true }
gltf = { workspace = true }
half = { workspace = true }
kira = { workspace = true }
log = { workspace = true }
mint = { workspace = true }
nalgebra = { workspace = true }
nalgebra-glm = { workspace = true }
petgraph = { workspace = true }
rand = "0.9"
rapier3d = { workspace = true }
raw-window-handle = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
web-time = { workspace = true }
winit = { workspace = true }

egui-wgpu = { workspace = true, optional = true }
wgpu = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = { workspace = true }
egui-winit = { workspace = true }
image = { workspace = true }
tokio = { workspace = true }
openxr = { workspace = true, optional = true }
ash = { workspace = true, optional = true }
wgpu-hal = { workspace = true, optional = true }
gpu-allocator = { workspace = true, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.7"
console_log = "1.0.0"
egui-winit = { workspace = true, default-features = false }
futures = "0.3.31"
image = { workspace = true }
js-sys = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.55"
web-sys = { version = "0.3", features = [
    "DataTransfer",
    "Document",
    "DragEvent",
    "Element",
    "Event",
    "EventTarget",
    "File",
    "FileList",
    "FileReader",
    "ProgressEvent",
    "Window",
] }

[package.metadata.cargo-machete]
ignored = ["nalgebra", "getrandom"]
