[package]
edition = "2024"
rust-version = "1.85"
name = "stardust-xr-server"
version = "0.45.0"
authors = ["Nova King <technobaboo@proton.me>"]
description = "Stardust XR reference display server"
license = "GPLv2"
repository = "https://github.com/StardustXR/stardust-xr-server/"
homepage = "https://stardustxr.org"

[workspace]
members = ["codegen"]

[patch."https://github.com/StardustXR/core.git"]
stardust-xr.path = "../core/core"

[workspace.dependencies.stardust-xr]
git = "https://github.com/StardustXR/core.git"
branch = "dev"

[[bin]]
name = "stardust-xr-server"
path = "src/main.rs"

[features]
default = ["wayland"]
wayland = ["dep:smithay", "dep:wayland-scanner", "dep:wayland-backend"]
profile_tokio = ["dep:console-subscriber", "tokio/tracing"]
profile_app = ["dep:tracing-tracy"]
local_deps = ["stereokit-rust/force-local-deps"]

[package.metadata.appimage]
auto_link = true
auto_link_exclude_list = [
	"libc*",
	"libdl*",
	"libpthread*",
	"ld-linux*",
	"libGL*",
	"libEGL*",
]

[profile.dev.package."*"]
opt-level = 3
debug = true
strip = false
debug-assertions = true
overflow-checks = true

[profile.release]
opt-level = 3
debug = "line-tables-only"
strip = true
debug-assertions = true
overflow-checks = false
lto = "thin"

[dependencies]
# small utility thingys
nanoid = "0.4.0"
lazy_static = "1.5.0"
rand = "0.8.5"
rustc-hash = "2.0.0"
send_wrapper = "0.6.0"
slotmap = "1.0.7"
global_counter = "=0.2.2"
parking_lot = "0.12.3"

# rust errors/logging
color-eyre = { version = "0.6.3", default-features = false }
clap = { version = "4.5.13", features = ["derive"] }
console-subscriber = { version = "0.4.0", optional = true }
thiserror = "2.0.9"
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-tracy = { version = "0.11.1", optional = true }

# (de)serialization
serde = { version = "1.0.205", features = ["derive"] }
serde_repr = "0.1.19"
toml = "0.8.19"

# mathy stuffs
glam = { version = "0.29.0", features = ["mint", "serde"] }
mint = "0.5.9"
tokio = { version = "1.39.2", features = ["rt-multi-thread", "signal", "time"] }

# linux stuffs
input-event-codes = "6.2.0"
zbus = { version = "5.0.0", default-features = false, features = ["tokio"] }
directories = "5.0.1"
xkbcommon-rs = "0.1.0"

# wayland
wayland-backend = { version = "0.3.7", optional = true, default-features = false }
wayland-scanner = { version = "0.31.4", optional = true }
dashmap = "6.1.0"

[dependencies.smithay]
git = "https://github.com/smithay/smithay.git"
default-features = false
features = ["desktop", "backend_drm", "renderer_gl", "wayland_frontend"]
optional = true


[dependencies.stereokit-rust]
git = "https://github.com/mvvvv/StereoKit-rust.git"
rev = "73ffaae6f42aa369e599a6ea0391f77840d682d8"
features = ["no-event-loop"]
default-features = false

[dependencies.stardust-xr]
workspace = true

[dependencies.stardust-xr-server-codegen]
path = "codegen"
