High-level, idiomatic Haskell bindings for the Vulkan graphics API, reducing verbosity while retaining full functionality.
Vulkan is a Haskell library that provides high-level bindings to the Vulkan graphics API, offering an idiomatic Haskell interface that reduces the verbosity and boilerplate of the C API. It automates low-level tasks like function pointer retrieval and memory management while retaining full access to Vulkan's features, making it easier to write graphics and compute applications in Haskell.
Haskell developers working on graphics-intensive applications, game engines, or GPU compute projects who want to leverage Vulkan's performance without dealing with C-level complexity.
Developers choose these bindings for their type-safe, idiomatic Haskell design that eliminates Vulkan's C API verbosity, provides automatic error handling, and ensures memory safety through bracketed commands, all while maintaining full compatibility with Vulkan's specification.
Haskell bindings for Vulkan
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates manual vkGetInstanceProcAddr calls, reducing setup boilerplate and errors as explicitly mentioned in the README's 'Things to know' section.
Uses Haskell's type system to safely represent Vulkan's pNext chains with GADTs and pattern synonyms, preventing runtime type mismatches.
Provides commands like withInstance and cmdUseRenderPass for automatic resource cleanup, ensuring proper Vulkan resource lifecycle management without manual destroy calls.
Converts low-level C types (e.g., VkBool32 to Bool, C strings to ByteString) and uses Vector for arrays, making API usage more Haskell-native and readable.
Several Vulkan video extensions (e.g., VK_KHR_video_queue) are explicitly disabled in the generator, limiting functionality for multimedia applications as noted in 'Current Status'.
The library is 64-bit only and requires GHC 8.6+, excluding older systems and Haskell setups, which restricts portability and adoption.
Setting up requires specific system packages and detailed steps, especially on Windows with Vulkan SDK and SDL2 dependencies, as outlined in the lengthy 'Building' sections.