{-# OPTIONS_GHC -Wno-orphans #-} module Mischief.WGPU ( -- * What is WGPU? -- $whatis -- * Installing WGPU -- $installing -- * Possible Issues -- $issues module Mischief.WGPU.Core, ) where import Mischief.WGPU.Core -- $whatis -- [WGPU](https://github.com/gfx-rs/wgpu) is a low-level Rust rendering API. It -- is compatible with many rendering backends including Vulkan, Metal, D3D12, OpenGL, WebGL2 and WebGPU. -- -- This module provides bindings for [wgpu-native](https://github.com/gfx-rs/wgpu-native/releases/tag/v29.0.1.1), -- a C-based wrapper around WGPU. -- $installing -- Download the correct binary build from [here](https://github.com/gfx-rs/wgpu-native/releases/tag/v29.0.1.1) for your -- Operating System. -- -- Put the path to it in the @extra-lib-dirs@ of your haskell project: -- -- @ -- extra-lib-dirs: \/path\/to\/wgpu\/lib -- @ -- -- This is usually done in @cabal.project.local@ (since it will be different on each developer's machine) but can be put in your -- normal @.cabal@ file too. -- $issues -- -- On linux you may also need to add this path to the @LD_LIBRARY_PATH@ env variable, like so: -- -- @ -- export LD_LIBRARY_PATH=\"path\/to\/wgpu\/lib\:\$LD_LIBRARY_PATH\" -- @ -- -- On mac, you might encounter a problem where the OS refuses to include the wgpu headers into hsc2hs. In that case, you'll need to add this into your -- @cabal.project.local@: -- -- @ -- package mischief-render -- hsc2hs-options: --lflag=-Wl,-rpath,path\/to\/wgpu\/lib -- @ -- -- And run this on the CLI: -- -- @ -- xattr -dr com.apple.quarantine path\/to\/wgpu -- @