[package]
name = "dear-imgui-ash"
version = "0.10.2"
edition.workspace = true
description = "Vulkan (Ash) renderer backend for dear-imgui-rs"
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/dear-imgui-ash"
categories.workspace = true
keywords.workspace = true

[dependencies]
dear-imgui-rs = { path = "../../dear-imgui", version = "0.10" }
thiserror.workspace = true
log.workspace = true

# Vulkan (native only)
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ash = { version = "0.38", default-features = false, features = ["debug", "std"] }
ash-window = { version = "0.13", optional = true }
winit = { workspace = true, optional = true }

# Optional allocators (native only)
gpu-allocator = { version = "0.27", default-features = false, features = ["vulkan"], optional = true }
vk-mem = { version = "0.5", optional = true }

[features]
default = []
# Enable gpu-allocator for internal buffers/textures
gpu-allocator = ["dep:gpu-allocator"]
# Enable vk-mem for internal buffers/textures
vk-mem = ["dep:vk-mem"]
# Use Vulkan dynamic rendering instead of a render pass.
dynamic-rendering = []

# Experimental multi-viewport rendering via winit platform backend.
# Requires `dear-imgui-rs/multi-viewport` (PlatformIO callbacks) and `ash-window` (surface creation).
multi-viewport-winit = ["dear-imgui-rs/multi-viewport", "dep:winit", "dep:ash-window"]

# Experimental multi-viewport rendering via the SDL3 platform backend.
# Requires `dear-imgui-rs/multi-viewport`. Surface creation is delegated to the platform backend via
# `ImGuiPlatformIO::Platform_CreateVkSurface` (see `imgui_impl_sdl3.cpp`).
multi-viewport-sdl3 = ["dear-imgui-rs/multi-viewport"]
