How ash-rs/ash works
Ash is a low-level Rust wrapper for Vulkan: an application loads Vulkan entry points, creates an instance and device, then uses typed bindings and explicitly loaded extension dispatch to issue Vulkan operations. Major capability branches include window-system surfaces and swapchains, graphics and ray-tracing extensions, video bindings, and profiling/diagnostic extensions. The README documents loader and safety behavior; sampled source confirms representative extension calls and surface creation, but does not expose all dispatch wiring.
Main entry points: extensions_generated.rs Extension dispatch · instance.rs Instance API · lib.rs Surface creation helper · vk.rs Vulkan types
Components 16
Core Vulkan API
- Entry loader
ash/src/entry.rs - Instance API
ash/src/instance.rs - Device API
ash/src/device.rs - Function tables
ash/src/tables.rs
Vulkan Extensions
- Extension dispatch
ash/src/extensions_generated.rs - Surface and swapchain
ash/src/extensions/khr/swapchain.rs - Ray tracing
ash/src/extensions/khr/ray_tracing_pipeline.rs - Vulkan video
ash/src/extensions/khr/video_queue.rs - Profiling and diagnostics
ash/src/extensions/khr/performance_query.rs
Window Integration
- Surface creation helper
ash-window/src/lib.rs
Typed Bindings
- Vulkan types
ash/src/vk.rs - Type definitions
ash/src/vk/definitions.rs - Features and flags
ash/src/vk/features.rs
Other components
- Vulkan application
- Window system
- Vulkan loader and driver
Connections 19
- Vulkan application → Entry loader: loads entry
- Entry loader → Vulkan loader and driver: loads library
- Vulkan application → Instance API: creates instance
- Instance API → Function tables: loads instance functions
- Instance API → Device API: creates device
- Device API → Function tables: loads device functions
- Vulkan application → Device API: issues commands
- Vulkan application → Vulkan types: uses typed API
- Vulkan types → Type definitions: defines handles
- Vulkan types → Features and flags: defines features
- Vulkan application → Extension dispatch: loads extensions
- Extension dispatch → Surface and swapchain: dispatches calls
- Extension dispatch → Ray tracing: dispatches calls
- Extension dispatch → Vulkan video: dispatches calls
- Extension dispatch → Profiling and diagnostics: dispatches calls
- Vulkan application → Surface creation helper: requests surface
- Surface creation helper → Window system: uses handles
- Surface creation helper → Surface and swapchain: creates surface
- Vulkan application → Surface and swapchain: uses swapchain