gpu-allocator 0.22.0

Memory allocator for GPU memory in Vulkan and DirectX 12
Documentation
[package]
name = "gpu-allocator"
version = "0.22.0"
authors = ["Traverse Research <opensource@traverseresearch.nl>"]
edition = "2018"
license = "MIT OR Apache-2.0"
description = "Memory allocator for GPU memory in Vulkan and DirectX 12"
categories = ["rendering", "rendering::graphics-api"]
homepage = "https://github.com/Traverse-Research/gpu-allocator"
repository = "https://github.com/Traverse-Research/gpu-allocator"
keywords = ["vulkan", "memory", "allocator"]
documentation = "https://docs.rs/gpu-allocator/"

include = [
    "/README.md",
    "/LICENSE-*",
    "/src",
    "/examples",
]

[dependencies]
backtrace = "0.3"
log = "0.4"
thiserror = "1.0"
# Only needed for vulkan.  Disable all default features as good practice,
# such as the ability to link/load a Vulkan library.
ash = { version = ">=0.34, <=0.37", optional = true, default-features = false, features = ["debug"] }
# Only needed for visualizer.
imgui = { version = "0.10", features = ["tables-api"], optional = true }

[target.'cfg(windows)'.dependencies]
# Only needed for public-winapi interop helpers
winapi = { version = "0.3.9", features = ["d3d12", "winerror", "impl-default", "impl-debug"], optional = true }

[target.'cfg(windows)'.dependencies.windows]
version = "0.44"
features = [
    "Win32_Foundation",
    "Win32_Graphics",
    "Win32_Graphics_Direct3D",
    "Win32_Graphics_Direct3D12",
    "Win32_Graphics_Dxgi",
    "Win32_Graphics_Dxgi_Common",
]
optional = true

[dev-dependencies]
# Enable the "loaded" feature to be able to access the Vulkan entrypoint.
ash = { version = "0.37", default-features = false, features = ["debug", "loaded"] }
ash-window = "0.12"
raw-window-handle = "0.5"
winit = { version = "0.27", features = ["x11", "wayland"] }
env_logger = "0.10"

[target.'cfg(windows)'.dev-dependencies]
winapi = { version = "0.3.9", features = ["d3d12", "d3d12sdklayers", "dxgi1_6", "winerror", "impl-default", "impl-debug", "winuser", "windowsx", "libloaderapi"] }

[target.'cfg(windows)'.dev-dependencies.windows]
version = "0.44"
features = [
    "Win32_Foundation",
    "Win32_Graphics",
    "Win32_Graphics_Direct3D",
    "Win32_Graphics_Direct3D12",
    "Win32_Graphics_Dxgi",
    "Win32_Graphics_Dxgi_Common",
]

[[example]]
name = "vulkan-buffer"
required-features = ["vulkan", "ash/loaded"]

[[example]]
name = "vulkan-visualization"
required-features = ["vulkan", "ash/loaded", "visualizer"]

[[example]]
name = "d3d12-buffer"
required-features = ["d3d12", "public-winapi"]

[[example]]
name = "d3d12-buffer-winrs"
required-features = ["d3d12"]

[[example]]
name = "d3d12-visualization"
required-features = ["d3d12", "public-winapi", "visualizer"]


[features]
visualizer = ["imgui"]
vulkan = ["ash"]
d3d12 = ["windows"]
# Expose helper functionality for winapi types to interface with gpu-allocator, which is primarily windows-rs driven
public-winapi = ["dep:winapi"]

default = ["d3d12", "vulkan"]