diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
 # Revision history for wgpu-raw-hs
 
+## 0.3.0.0 -- 2021-08-30
+
+- Add SDL surfaces.
+- Switch to using `MonadIO` instead of plain `IO` when possible.
+- Supply bracketing functions for `withXXX`.
+- Wrap raw `WGPUHsInstance` into a new structure which explicitly retains a
+  reference to the dynamic library. This helps with resource freeing.
+- Add extra `{-# INLINABLE #-}` pragmas.
+
 ## 0.2.0.1 -- 2021-08-24
 
 - Linux support.
diff --git a/cbits/log.c b/cbits/log.c
new file mode 100644
--- /dev/null
+++ b/cbits/log.c
@@ -0,0 +1,24 @@
+/*
+ * Logging callback.
+ *
+ * If the logging function is implemented in Haskell, then all of the API
+ * functions must be marked as "safe", since they could potentially call back
+ * into the GHC runtime to invoke the logging callback. To avoid this, implement
+ * the logging callback in C.
+ */
+
+#include <stdio.h>
+#include "wgpu.h"
+
+void wgpuhs_logging_callback(WGPULogLevel level, const char *msg) {
+  char* level_str;
+  switch (level) {
+    case WGPULogLevel_Error: level_str = "Error"; break;
+    case WGPULogLevel_Warn: level_str = "Warn"; break;
+    case WGPULogLevel_Info: level_str = "Info"; break;
+    case WGPULogLevel_Debug: level_str = "Debug"; break;
+    case WGPULogLevel_Trace: level_str = "Trace"; break;
+    default: level_str = "Unknown";
+  }
+  printf("[%s] %s\n", level_str, msg);
+}
diff --git a/cbits/sdl-surface-linux-x11.c b/cbits/sdl-surface-linux-x11.c
new file mode 100644
--- /dev/null
+++ b/cbits/sdl-surface-linux-x11.c
@@ -0,0 +1,39 @@
+/*
+ * SDL surface handling (Linux X11).
+ *
+ * The Haskell binding's used of 'getWindowWMInfo' is essentially useless
+ * because 'SysWMInfo' is an opaque pointer. Here, we DIY for now.
+ */
+
+#define WGPUHS_TARGET_MACOS 1
+#define WGPUHS_TARGET_LINUX 2
+#define WGPUHS_TARGET_WINDOWS 3
+
+#if WGPUHS_TARGET == WGPUHS_TARGET_LINUX
+
+#include <SDL.h>
+#include <SDL_syswm.h>
+
+Window wgpuhs_sdl_to_x11_window(SDL_Window *window) {
+  SDL_SysWMinfo info;
+  SDL_VERSION(&info.version);
+  if (SDL_GetWindowWMInfo(window, &info)) {
+    return info.info.x11.window;
+  } else {
+    printf("WGPUHS: ERROR: Could not find X11 window from SDL window.");
+    return 0;
+  }
+}
+
+Display* wgpuhs_sdl_to_x11_display(SDL_Window *window) {
+  SDL_SysWMinfo info;
+  SDL_VERSION(&info.version);
+  if (SDL_GetWindowWMInfo(window, &info)) {
+    return info.info.x11.display;
+  } else {
+    printf("WGPUHS: ERROR: Could not find X11 display from SDL window.");
+    return NULL;
+  }
+}
+
+#endif
diff --git a/cbits/sdl-surface-macos.m b/cbits/sdl-surface-macos.m
new file mode 100644
--- /dev/null
+++ b/cbits/sdl-surface-macos.m
@@ -0,0 +1,31 @@
+/*
+ * SDL surface handling (macOS).
+ *
+ * The Haskell binding's use of 'getWindowWMInfo' is essentially useless
+ * because 'SysWMInfo' is an opaque pointer. Here, we DIY for now.
+ */
+
+#define WGPUHS_TARGET_MACOS 1
+#define WGPUHS_TARGET_LINUX 2
+#define WGPUHS_TARGET_WINDOWS 3
+
+#if WGPUHS_TARGET == WGPUHS_TARGET_MACOS
+
+#include <AppKit/AppKit.h>
+#include <Foundation/Foundation.h>
+#include <QuartzCore/CAMetalLayer.h>
+#include <SDL.h>
+#include <SDL_syswm.h>
+
+NSWindow *wgpuhs_sdl_to_ns_window(SDL_Window *window) {
+  SDL_SysWMinfo info;
+  SDL_VERSION(&info.version);
+  if (SDL_GetWindowWMInfo(window, &info)) {
+    return info.info.cocoa.window;
+  } else {
+    printf("WGPUHS: ERROR: Could not find macOS window from SDL window.");
+    return NULL;
+  }
+}
+
+#endif
diff --git a/cbits/sdl-surface-windows.c b/cbits/sdl-surface-windows.c
new file mode 100644
--- /dev/null
+++ b/cbits/sdl-surface-windows.c
@@ -0,0 +1,28 @@
+/*
+ * SDL surface handling (Microsoft Windows).
+ *
+ * The Haskell binding's used of 'getWindowWMInfo' is essentially useless
+ * because 'SysWMInfo' is an opaque pointer. Here, we DIY for now.
+ */
+
+#define WGPUHS_TARGET_MACOS 1
+#define WGPUHS_TARGET_LINUX 2
+#define WGPUHS_TARGET_WINDOWS 3
+
+#if WGPUHS_TARGET == WGPUHS_TARGET_WINDOWS
+
+#include <SDL.h>
+#include <SDL_syswm.h>
+
+HWND wgpuhs_sdl_to_hwnd(SDL_Window *window) {
+  SDL_SysWMinfo info;
+  SDL_VERSION(&info.version);
+  if (SDL_GetWindowWMInfo(window, &info)) {
+    return info.info.win.window;
+  } else {
+    printf("WGPUHS: ERROR: Could not find MS Windows window from SDL window.");
+    return NULL;
+  }
+}
+
+#endif
diff --git a/src/WGPU/Raw/Dynamic.hs b/src/WGPU/Raw/Dynamic.hs
--- a/src/WGPU/Raw/Dynamic.hs
+++ b/src/WGPU/Raw/Dynamic.hs
@@ -1,49 +1,86 @@
 {-# LANGUAGE CPP #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 
 module WGPU.Raw.Dynamic
-  ( -- * Functions
+  ( -- * Types
+    InstanceHandle (..),
+
+    -- * Functions
     withWGPU,
   )
 where
 
+import Control.Monad.IO.Class (MonadIO, liftIO)
 import WGPU.Raw.Generated.Fun (WGPUHsInstance, loadDynamicInstance)
 
 #ifdef WGPUHS_UNIX
-import System.Posix.DynamicLinker (withDL, dlsym)
+
+import System.Posix.DynamicLinker (dlsym, dlopen, dlclose, DL)
 import System.Posix.DynamicLinker.Prim (RTLDFlags(RTLD_NOW))
 
+data InstanceHandle = InstanceHandle
+  { instanceHandleDL :: !DL,
+    instanceHandleInstance :: !WGPUHsInstance
+  }
+
 -- | Load WGPU from a dynamic library and run a program using an instance.
 withWGPU ::
+  forall m r.
+  MonadIO m =>
   -- | Path to the wgpu-native dynamic library to load.
   FilePath ->
-  -- | IO action using an instance of the WGPUHsInstance.
-  (WGPUHsInstance -> IO a) ->
-  -- | Completed IO action.
-  IO a
-withWGPU dynlibFile action = do
-  withDL
-    dynlibFile [RTLD_NOW] $ \dl -> loadDynamicInstance (dlsym dl) >>= action
+  -- | Bracketing function.
+  -- This can (for example) be something like 'Control.Exception.Safe.bracket'.
+  (m InstanceHandle -> (InstanceHandle -> m ()) -> r) ->
+  -- | Usage or action component of the bracketing function.
+  r
+withWGPU dynlibFile bkt = do
+  let
+    create :: m InstanceHandle
+    create = do
+      dl <- liftIO $ dlopen dynlibFile [RTLD_NOW]
+      inst <- liftIO $ loadDynamicInstance (dlsym dl)
+      pure (InstanceHandle dl inst)
+
+    release :: InstanceHandle -> m ()
+    release = liftIO . dlclose . instanceHandleDL
+
+  bkt create release
 #endif
 
 #ifdef WGPUHS_WINDOWS
 import Foreign (FunPtr, castPtrToFunPtr)
 import System.Win32.DLL (loadLibrary, freeLibrary, getProcAddress)
+import System.Win32.Types (HINSTANCE)
 
+data InstanceHandle = InstanceHandle
+  { instanceHandleDL :: !HINSTANCE,
+    instanceHandleInstance :: !WGPUHsInstance
+  }
+
 -- | Load WGPU from a dynamic library and run a program using an instance.
 withWGPU ::
+  forall m r.
+  MonadIO m =>
   -- | Path to the wgpu-native dynamic library to load.
   FilePath ->
-  -- | IO action using an instance of the WGPUHsInstance.
-  (WGPUHsInstance -> IO a) ->
-  -- | Completed IO action.
-  IO a
-withWGPU dynlibFile action = do
-  -- TODO: safer bracketing
-  hInstance <- loadLibrary dynlibFile
-  let load :: String -> IO (FunPtr a)
-      load = fmap castPtrToFunPtr . getProcAddress hInstance
-  wgpuHsInstance <- loadDynamicInstance load
-  result <- action wgpuHsInstance
-  freeLibrary hInstance
-  pure result
+  -- | Bracketing function.
+  -- This can (for example) be something like 'Control.Exception.Safe.bracket'.
+  (m InstanceHandle -> (InstanceHandle -> m ()) -> r) ->
+  -- | Usage or action component of the bracketing function.
+  r
+withWGPU dynlibFile bkt = do
+  let
+    create :: m InstanceHandle
+    create = do
+      hInstance <- liftIO $ loadLibrary dynlibFile
+      let load :: String -> IO (FunPtr a)
+          load = fmap castPtrToFunPtr . getProcAddress hInstance
+      inst <- liftIO $ loadDynamicInstance load
+      pure (InstanceHandle hInstance inst)
+
+    release :: InstanceHandle -> m ()
+    release = liftIO . freeLibrary . instanceHandleDL
+
+  bkt create release
 #endif
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUAdapterType.hs b/src/WGPU/Raw/Generated/Enum/WGPUAdapterType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUAdapterType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUAdapterType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUAddressMode.hs b/src/WGPU/Raw/Generated/Enum/WGPUAddressMode.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUAddressMode.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUAddressMode.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUBackendType.hs b/src/WGPU/Raw/Generated/Enum/WGPUBackendType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUBackendType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUBackendType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUBlendFactor.hs b/src/WGPU/Raw/Generated/Enum/WGPUBlendFactor.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUBlendFactor.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUBlendFactor.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUBlendOperation.hs b/src/WGPU/Raw/Generated/Enum/WGPUBlendOperation.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUBlendOperation.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUBlendOperation.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUBufferBindingType.hs b/src/WGPU/Raw/Generated/Enum/WGPUBufferBindingType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUBufferBindingType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUBufferBindingType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUBufferMapAsyncStatus.hs b/src/WGPU/Raw/Generated/Enum/WGPUBufferMapAsyncStatus.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUBufferMapAsyncStatus.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUBufferMapAsyncStatus.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUBufferUsage.hs b/src/WGPU/Raw/Generated/Enum/WGPUBufferUsage.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUBufferUsage.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUBufferUsage.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUColorWriteMask.hs b/src/WGPU/Raw/Generated/Enum/WGPUColorWriteMask.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUColorWriteMask.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUColorWriteMask.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUCompareFunction.hs b/src/WGPU/Raw/Generated/Enum/WGPUCompareFunction.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUCompareFunction.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUCompareFunction.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUCreatePipelineAsyncStatus.hs b/src/WGPU/Raw/Generated/Enum/WGPUCreatePipelineAsyncStatus.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUCreatePipelineAsyncStatus.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUCreatePipelineAsyncStatus.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUCullMode.hs b/src/WGPU/Raw/Generated/Enum/WGPUCullMode.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUCullMode.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUCullMode.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUErrorFilter.hs b/src/WGPU/Raw/Generated/Enum/WGPUErrorFilter.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUErrorFilter.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUErrorFilter.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUErrorType.hs b/src/WGPU/Raw/Generated/Enum/WGPUErrorType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUErrorType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUErrorType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUFilterMode.hs b/src/WGPU/Raw/Generated/Enum/WGPUFilterMode.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUFilterMode.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUFilterMode.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUFrontFace.hs b/src/WGPU/Raw/Generated/Enum/WGPUFrontFace.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUFrontFace.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUFrontFace.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUIndexFormat.hs b/src/WGPU/Raw/Generated/Enum/WGPUIndexFormat.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUIndexFormat.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUIndexFormat.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUInputStepMode.hs b/src/WGPU/Raw/Generated/Enum/WGPUInputStepMode.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUInputStepMode.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUInputStepMode.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPULoadOp.hs b/src/WGPU/Raw/Generated/Enum/WGPULoadOp.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPULoadOp.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPULoadOp.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPULogLevel.hs b/src/WGPU/Raw/Generated/Enum/WGPULogLevel.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPULogLevel.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPULogLevel.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUMapMode.hs b/src/WGPU/Raw/Generated/Enum/WGPUMapMode.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUMapMode.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUMapMode.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUNativeFeature.hs b/src/WGPU/Raw/Generated/Enum/WGPUNativeFeature.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUNativeFeature.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUNativeFeature.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUNativeSType.hs b/src/WGPU/Raw/Generated/Enum/WGPUNativeSType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUNativeSType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUNativeSType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUPipelineStatisticName.hs b/src/WGPU/Raw/Generated/Enum/WGPUPipelineStatisticName.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUPipelineStatisticName.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUPipelineStatisticName.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUPresentMode.hs b/src/WGPU/Raw/Generated/Enum/WGPUPresentMode.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUPresentMode.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUPresentMode.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUPrimitiveTopology.hs b/src/WGPU/Raw/Generated/Enum/WGPUPrimitiveTopology.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUPrimitiveTopology.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUPrimitiveTopology.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUQueryType.hs b/src/WGPU/Raw/Generated/Enum/WGPUQueryType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUQueryType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUQueryType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUQueueWorkDoneStatus.hs b/src/WGPU/Raw/Generated/Enum/WGPUQueueWorkDoneStatus.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUQueueWorkDoneStatus.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUQueueWorkDoneStatus.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUSType.hs b/src/WGPU/Raw/Generated/Enum/WGPUSType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUSType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUSType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUSamplerBindingType.hs b/src/WGPU/Raw/Generated/Enum/WGPUSamplerBindingType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUSamplerBindingType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUSamplerBindingType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUShaderStage.hs b/src/WGPU/Raw/Generated/Enum/WGPUShaderStage.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUShaderStage.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUShaderStage.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUStencilOperation.hs b/src/WGPU/Raw/Generated/Enum/WGPUStencilOperation.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUStencilOperation.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUStencilOperation.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUStorageTextureAccess.hs b/src/WGPU/Raw/Generated/Enum/WGPUStorageTextureAccess.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUStorageTextureAccess.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUStorageTextureAccess.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUStoreOp.hs b/src/WGPU/Raw/Generated/Enum/WGPUStoreOp.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUStoreOp.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUStoreOp.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureAspect.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureAspect.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureAspect.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureAspect.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureComponentType.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureComponentType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureComponentType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureComponentType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureDimension.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureDimension.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureDimension.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureDimension.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureFormat.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureFormat.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureFormat.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureFormat.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureSampleType.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureSampleType.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureSampleType.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureSampleType.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureUsage.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureUsage.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureUsage.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureUsage.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUTextureViewDimension.hs b/src/WGPU/Raw/Generated/Enum/WGPUTextureViewDimension.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUTextureViewDimension.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUTextureViewDimension.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Enum/WGPUVertexFormat.hs b/src/WGPU/Raw/Generated/Enum/WGPUVertexFormat.hs
--- a/src/WGPU/Raw/Generated/Enum/WGPUVertexFormat.hs
+++ b/src/WGPU/Raw/Generated/Enum/WGPUVertexFormat.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
diff --git a/src/WGPU/Raw/Generated/Fun.hs b/src/WGPU/Raw/Generated/Fun.hs
--- a/src/WGPU/Raw/Generated/Fun.hs
+++ b/src/WGPU/Raw/Generated/Fun.hs
@@ -5,12 +5,13 @@
 {-# OPTIONS_GHC -Wno-unused-imports #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
 module WGPU.Raw.Generated.Fun where
 
+import Control.Monad.IO.Class (MonadIO, liftIO)
 import Foreign
 import Foreign.C
 import WGPU.Raw.Generated.Enum.WGPUAdapterType
@@ -115,303 +116,593 @@
 import WGPU.Raw.Generated.Struct.WGPUVertexBufferLayout
 import WGPU.Raw.Generated.Struct.WGPUVertexState
 import WGPU.Raw.Types
-import Prelude (IO, String, pure, (<$>))
+import Prelude (IO, String, pure, ($), (<$>))
 
 data WGPUHsInstance = WGPUHsInstance
-  { wgpuAdapterGetProperties :: WGPUAdapter -> Ptr (WGPUAdapterProperties) -> IO (()),
-    wgpuAdapterRequestDevice :: WGPUAdapter -> Ptr (WGPUDeviceDescriptor) -> WGPURequestDeviceCallback -> Ptr (()) -> IO (()),
-    wgpuBufferDestroy :: WGPUBuffer -> IO (()),
-    wgpuBufferGetMappedRange :: WGPUBuffer -> CSize -> CSize -> IO (Ptr (())),
-    wgpuBufferMapAsync :: WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> IO (()),
-    wgpuBufferUnmap :: WGPUBuffer -> IO (()),
-    wgpuCommandEncoderBeginComputePass :: WGPUCommandEncoder -> Ptr (WGPUComputePassDescriptor) -> IO (WGPUComputePassEncoder),
-    wgpuCommandEncoderBeginRenderPass :: WGPUCommandEncoder -> Ptr (WGPURenderPassDescriptor) -> IO (WGPURenderPassEncoder),
-    wgpuCommandEncoderCopyBufferToBuffer :: WGPUCommandEncoder -> WGPUBuffer -> Word64 -> WGPUBuffer -> Word64 -> Word64 -> IO (()),
-    wgpuCommandEncoderCopyBufferToTexture :: WGPUCommandEncoder -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (()),
-    wgpuCommandEncoderCopyTextureToTexture :: WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (()),
-    wgpuCommandEncoderCopyTextureToBuffer :: WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUExtent3D) -> IO (()),
-    wgpuCommandEncoderFinish :: WGPUCommandEncoder -> Ptr (WGPUCommandBufferDescriptor) -> IO (WGPUCommandBuffer),
-    wgpuComputePassEncoderDispatch :: WGPUComputePassEncoder -> Word32 -> Word32 -> Word32 -> IO (()),
-    wgpuComputePassEncoderDispatchIndirect :: WGPUComputePassEncoder -> WGPUBuffer -> Word64 -> IO (()),
-    wgpuComputePassEncoderEndPass :: WGPUComputePassEncoder -> IO (()),
-    wgpuComputePassEncoderSetBindGroup :: WGPUComputePassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (()),
-    wgpuComputePassEncoderSetPipeline :: WGPUComputePassEncoder -> WGPUComputePipeline -> IO (()),
-    wgpuDeviceCreateBindGroup :: WGPUDevice -> Ptr (WGPUBindGroupDescriptor) -> IO (WGPUBindGroup),
-    wgpuDeviceCreateBindGroupLayout :: WGPUDevice -> Ptr (WGPUBindGroupLayoutDescriptor) -> IO (WGPUBindGroupLayout),
-    wgpuDeviceCreateBuffer :: WGPUDevice -> Ptr (WGPUBufferDescriptor) -> IO (WGPUBuffer),
-    wgpuDeviceCreateCommandEncoder :: WGPUDevice -> Ptr (WGPUCommandEncoderDescriptor) -> IO (WGPUCommandEncoder),
-    wgpuDeviceCreateComputePipeline :: WGPUDevice -> Ptr (WGPUComputePipelineDescriptor) -> IO (WGPUComputePipeline),
-    wgpuDeviceCreatePipelineLayout :: WGPUDevice -> Ptr (WGPUPipelineLayoutDescriptor) -> IO (WGPUPipelineLayout),
-    wgpuDeviceCreateRenderPipeline :: WGPUDevice -> Ptr (WGPURenderPipelineDescriptor) -> IO (WGPURenderPipeline),
-    wgpuDeviceCreateSampler :: WGPUDevice -> Ptr (WGPUSamplerDescriptor) -> IO (WGPUSampler),
-    wgpuDeviceCreateShaderModule :: WGPUDevice -> Ptr (WGPUShaderModuleDescriptor) -> IO (WGPUShaderModule),
-    wgpuDeviceCreateSwapChain :: WGPUDevice -> WGPUSurface -> Ptr (WGPUSwapChainDescriptor) -> IO (WGPUSwapChain),
-    wgpuDeviceCreateTexture :: WGPUDevice -> Ptr (WGPUTextureDescriptor) -> IO (WGPUTexture),
-    wgpuDeviceGetQueue :: WGPUDevice -> IO (WGPUQueue),
-    wgpuInstanceCreateSurface :: WGPUInstance -> Ptr (WGPUSurfaceDescriptor) -> IO (WGPUSurface),
-    wgpuInstanceRequestAdapter :: WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> IO (()),
-    wgpuQueueSubmit :: WGPUQueue -> Word32 -> Ptr (WGPUCommandBuffer) -> IO (()),
-    wgpuQueueWriteBuffer :: WGPUQueue -> WGPUBuffer -> Word64 -> Ptr (()) -> CSize -> IO (()),
-    wgpuQueueWriteTexture :: WGPUQueue -> Ptr (WGPUImageCopyTexture) -> Ptr (()) -> CSize -> Ptr (WGPUTextureDataLayout) -> Ptr (WGPUExtent3D) -> IO (()),
-    wgpuRenderPassEncoderDraw :: WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (()),
-    wgpuRenderPassEncoderDrawIndexed :: WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO (()),
-    wgpuRenderPassEncoderDrawIndexedIndirect :: WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (()),
-    wgpuRenderPassEncoderDrawIndirect :: WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (()),
-    wgpuRenderPassEncoderEndPass :: WGPURenderPassEncoder -> IO (()),
-    wgpuRenderPassEncoderSetBindGroup :: WGPURenderPassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (()),
-    wgpuRenderPassEncoderSetBlendConstant :: WGPURenderPassEncoder -> Ptr (WGPUColor) -> IO (()),
-    wgpuRenderPassEncoderSetIndexBuffer :: WGPURenderPassEncoder -> WGPUBuffer -> WGPUIndexFormat -> Word64 -> Word64 -> IO (()),
-    wgpuRenderPassEncoderSetPipeline :: WGPURenderPassEncoder -> WGPURenderPipeline -> IO (()),
-    wgpuRenderPassEncoderSetScissorRect :: WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (()),
-    wgpuRenderPassEncoderSetStencilReference :: WGPURenderPassEncoder -> Word32 -> IO (()),
-    wgpuRenderPassEncoderSetVertexBuffer :: WGPURenderPassEncoder -> Word32 -> WGPUBuffer -> Word64 -> Word64 -> IO (()),
-    wgpuRenderPassEncoderSetViewport :: WGPURenderPassEncoder -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO (()),
-    wgpuSurfaceGetPreferredFormat :: WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> IO (()),
-    wgpuSwapChainGetCurrentTextureView :: WGPUSwapChain -> IO (WGPUTextureView),
-    wgpuSwapChainPresent :: WGPUSwapChain -> IO (()),
-    wgpuTextureCreateView :: WGPUTexture -> Ptr (WGPUTextureViewDescriptor) -> IO (WGPUTextureView),
-    wgpuTextureDestroy :: WGPUTexture -> IO (()),
-    wgpuDevicePoll :: WGPUDevice -> CBool -> IO (()),
-    wgpuSetLogCallback :: WGPULogCallback -> IO (()),
-    wgpuSetLogLevel :: WGPULogLevel -> IO (()),
-    wgpuGetVersion :: IO (Word32),
-    wgpuRenderPassEncoderSetPushConstants :: WGPURenderPassEncoder -> WGPUShaderStage -> Word32 -> Word32 -> Ptr (()) -> IO (())
+  { wgpuAdapterRequestDeviceIO :: WGPUAdapter -> Ptr (WGPUDeviceDescriptor) -> WGPURequestDeviceCallback -> Ptr (()) -> IO (()),
+    wgpuBufferMapAsyncIO :: WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> IO (()),
+    wgpuInstanceRequestAdapterIO :: WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> IO (()),
+    wgpuSurfaceGetPreferredFormatIO :: WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> IO (()),
+    wgpuAdapterGetPropertiesIO :: WGPUAdapter -> Ptr (WGPUAdapterProperties) -> IO (()),
+    wgpuBufferDestroyIO :: WGPUBuffer -> IO (()),
+    wgpuBufferGetMappedRangeIO :: WGPUBuffer -> CSize -> CSize -> IO (Ptr (())),
+    wgpuBufferUnmapIO :: WGPUBuffer -> IO (()),
+    wgpuCommandEncoderBeginComputePassIO :: WGPUCommandEncoder -> Ptr (WGPUComputePassDescriptor) -> IO (WGPUComputePassEncoder),
+    wgpuCommandEncoderBeginRenderPassIO :: WGPUCommandEncoder -> Ptr (WGPURenderPassDescriptor) -> IO (WGPURenderPassEncoder),
+    wgpuCommandEncoderCopyBufferToBufferIO :: WGPUCommandEncoder -> WGPUBuffer -> Word64 -> WGPUBuffer -> Word64 -> Word64 -> IO (()),
+    wgpuCommandEncoderCopyBufferToTextureIO :: WGPUCommandEncoder -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (()),
+    wgpuCommandEncoderCopyTextureToTextureIO :: WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (()),
+    wgpuCommandEncoderCopyTextureToBufferIO :: WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUExtent3D) -> IO (()),
+    wgpuCommandEncoderFinishIO :: WGPUCommandEncoder -> Ptr (WGPUCommandBufferDescriptor) -> IO (WGPUCommandBuffer),
+    wgpuComputePassEncoderDispatchIO :: WGPUComputePassEncoder -> Word32 -> Word32 -> Word32 -> IO (()),
+    wgpuComputePassEncoderDispatchIndirectIO :: WGPUComputePassEncoder -> WGPUBuffer -> Word64 -> IO (()),
+    wgpuComputePassEncoderEndPassIO :: WGPUComputePassEncoder -> IO (()),
+    wgpuComputePassEncoderSetBindGroupIO :: WGPUComputePassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (()),
+    wgpuComputePassEncoderSetPipelineIO :: WGPUComputePassEncoder -> WGPUComputePipeline -> IO (()),
+    wgpuDeviceCreateBindGroupIO :: WGPUDevice -> Ptr (WGPUBindGroupDescriptor) -> IO (WGPUBindGroup),
+    wgpuDeviceCreateBindGroupLayoutIO :: WGPUDevice -> Ptr (WGPUBindGroupLayoutDescriptor) -> IO (WGPUBindGroupLayout),
+    wgpuDeviceCreateBufferIO :: WGPUDevice -> Ptr (WGPUBufferDescriptor) -> IO (WGPUBuffer),
+    wgpuDeviceCreateCommandEncoderIO :: WGPUDevice -> Ptr (WGPUCommandEncoderDescriptor) -> IO (WGPUCommandEncoder),
+    wgpuDeviceCreateComputePipelineIO :: WGPUDevice -> Ptr (WGPUComputePipelineDescriptor) -> IO (WGPUComputePipeline),
+    wgpuDeviceCreatePipelineLayoutIO :: WGPUDevice -> Ptr (WGPUPipelineLayoutDescriptor) -> IO (WGPUPipelineLayout),
+    wgpuDeviceCreateRenderPipelineIO :: WGPUDevice -> Ptr (WGPURenderPipelineDescriptor) -> IO (WGPURenderPipeline),
+    wgpuDeviceCreateSamplerIO :: WGPUDevice -> Ptr (WGPUSamplerDescriptor) -> IO (WGPUSampler),
+    wgpuDeviceCreateShaderModuleIO :: WGPUDevice -> Ptr (WGPUShaderModuleDescriptor) -> IO (WGPUShaderModule),
+    wgpuDeviceCreateSwapChainIO :: WGPUDevice -> WGPUSurface -> Ptr (WGPUSwapChainDescriptor) -> IO (WGPUSwapChain),
+    wgpuDeviceCreateTextureIO :: WGPUDevice -> Ptr (WGPUTextureDescriptor) -> IO (WGPUTexture),
+    wgpuDeviceGetQueueIO :: WGPUDevice -> IO (WGPUQueue),
+    wgpuInstanceCreateSurfaceIO :: WGPUInstance -> Ptr (WGPUSurfaceDescriptor) -> IO (WGPUSurface),
+    wgpuQueueSubmitIO :: WGPUQueue -> Word32 -> Ptr (WGPUCommandBuffer) -> IO (()),
+    wgpuQueueWriteBufferIO :: WGPUQueue -> WGPUBuffer -> Word64 -> Ptr (()) -> CSize -> IO (()),
+    wgpuQueueWriteTextureIO :: WGPUQueue -> Ptr (WGPUImageCopyTexture) -> Ptr (()) -> CSize -> Ptr (WGPUTextureDataLayout) -> Ptr (WGPUExtent3D) -> IO (()),
+    wgpuRenderPassEncoderDrawIO :: WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (()),
+    wgpuRenderPassEncoderDrawIndexedIO :: WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO (()),
+    wgpuRenderPassEncoderDrawIndexedIndirectIO :: WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (()),
+    wgpuRenderPassEncoderDrawIndirectIO :: WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (()),
+    wgpuRenderPassEncoderEndPassIO :: WGPURenderPassEncoder -> IO (()),
+    wgpuRenderPassEncoderSetBindGroupIO :: WGPURenderPassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (()),
+    wgpuRenderPassEncoderSetBlendConstantIO :: WGPURenderPassEncoder -> Ptr (WGPUColor) -> IO (()),
+    wgpuRenderPassEncoderSetIndexBufferIO :: WGPURenderPassEncoder -> WGPUBuffer -> WGPUIndexFormat -> Word64 -> Word64 -> IO (()),
+    wgpuRenderPassEncoderSetPipelineIO :: WGPURenderPassEncoder -> WGPURenderPipeline -> IO (()),
+    wgpuRenderPassEncoderSetScissorRectIO :: WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (()),
+    wgpuRenderPassEncoderSetStencilReferenceIO :: WGPURenderPassEncoder -> Word32 -> IO (()),
+    wgpuRenderPassEncoderSetVertexBufferIO :: WGPURenderPassEncoder -> Word32 -> WGPUBuffer -> Word64 -> Word64 -> IO (()),
+    wgpuRenderPassEncoderSetViewportIO :: WGPURenderPassEncoder -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO (()),
+    wgpuSwapChainGetCurrentTextureViewIO :: WGPUSwapChain -> IO (WGPUTextureView),
+    wgpuSwapChainPresentIO :: WGPUSwapChain -> IO (()),
+    wgpuTextureCreateViewIO :: WGPUTexture -> Ptr (WGPUTextureViewDescriptor) -> IO (WGPUTextureView),
+    wgpuTextureDestroyIO :: WGPUTexture -> IO (()),
+    wgpuDevicePollIO :: WGPUDevice -> CBool -> IO (()),
+    wgpuSetLogCallbackIO :: WGPULogCallback -> IO (()),
+    wgpuSetLogLevelIO :: WGPULogLevel -> IO (()),
+    wgpuGetVersionIO :: IO (Word32),
+    wgpuRenderPassEncoderSetPushConstantsIO :: WGPURenderPassEncoder -> WGPUShaderStage -> Word32 -> Word32 -> Ptr (()) -> IO (())
   }
 
+wgpuAdapterRequestDevice :: (MonadIO m) => WGPUHsInstance -> WGPUAdapter -> Ptr (WGPUDeviceDescriptor) -> WGPURequestDeviceCallback -> Ptr (()) -> m (())
+wgpuAdapterRequestDevice inst param1 param2 param3 param4 =
+  liftIO $ wgpuAdapterRequestDeviceIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuAdapterRequestDevice #-}
+
+wgpuBufferMapAsync :: (MonadIO m) => WGPUHsInstance -> WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> m (())
+wgpuBufferMapAsync inst param1 param2 param3 param4 param5 param6 =
+  liftIO $ wgpuBufferMapAsyncIO inst param1 param2 param3 param4 param5 param6
+{-# INLINEABLE wgpuBufferMapAsync #-}
+
+wgpuInstanceRequestAdapter :: (MonadIO m) => WGPUHsInstance -> WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> m (())
+wgpuInstanceRequestAdapter inst param1 param2 param3 param4 =
+  liftIO $ wgpuInstanceRequestAdapterIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuInstanceRequestAdapter #-}
+
+wgpuSurfaceGetPreferredFormat :: (MonadIO m) => WGPUHsInstance -> WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> m (())
+wgpuSurfaceGetPreferredFormat inst param1 param2 param3 param4 =
+  liftIO $ wgpuSurfaceGetPreferredFormatIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuSurfaceGetPreferredFormat #-}
+
+wgpuAdapterGetProperties :: (MonadIO m) => WGPUHsInstance -> WGPUAdapter -> Ptr (WGPUAdapterProperties) -> m (())
+wgpuAdapterGetProperties inst param1 param2 =
+  liftIO $ wgpuAdapterGetPropertiesIO inst param1 param2
+{-# INLINEABLE wgpuAdapterGetProperties #-}
+
+wgpuBufferDestroy :: (MonadIO m) => WGPUHsInstance -> WGPUBuffer -> m (())
+wgpuBufferDestroy inst param1 =
+  liftIO $ wgpuBufferDestroyIO inst param1
+{-# INLINEABLE wgpuBufferDestroy #-}
+
+wgpuBufferGetMappedRange :: (MonadIO m) => WGPUHsInstance -> WGPUBuffer -> CSize -> CSize -> m (Ptr (()))
+wgpuBufferGetMappedRange inst param1 param2 param3 =
+  liftIO $ wgpuBufferGetMappedRangeIO inst param1 param2 param3
+{-# INLINEABLE wgpuBufferGetMappedRange #-}
+
+wgpuBufferUnmap :: (MonadIO m) => WGPUHsInstance -> WGPUBuffer -> m (())
+wgpuBufferUnmap inst param1 =
+  liftIO $ wgpuBufferUnmapIO inst param1
+{-# INLINEABLE wgpuBufferUnmap #-}
+
+wgpuCommandEncoderBeginComputePass :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> Ptr (WGPUComputePassDescriptor) -> m (WGPUComputePassEncoder)
+wgpuCommandEncoderBeginComputePass inst param1 param2 =
+  liftIO $ wgpuCommandEncoderBeginComputePassIO inst param1 param2
+{-# INLINEABLE wgpuCommandEncoderBeginComputePass #-}
+
+wgpuCommandEncoderBeginRenderPass :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> Ptr (WGPURenderPassDescriptor) -> m (WGPURenderPassEncoder)
+wgpuCommandEncoderBeginRenderPass inst param1 param2 =
+  liftIO $ wgpuCommandEncoderBeginRenderPassIO inst param1 param2
+{-# INLINEABLE wgpuCommandEncoderBeginRenderPass #-}
+
+wgpuCommandEncoderCopyBufferToBuffer :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> WGPUBuffer -> Word64 -> WGPUBuffer -> Word64 -> Word64 -> m (())
+wgpuCommandEncoderCopyBufferToBuffer inst param1 param2 param3 param4 param5 param6 =
+  liftIO $ wgpuCommandEncoderCopyBufferToBufferIO inst param1 param2 param3 param4 param5 param6
+{-# INLINEABLE wgpuCommandEncoderCopyBufferToBuffer #-}
+
+wgpuCommandEncoderCopyBufferToTexture :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> m (())
+wgpuCommandEncoderCopyBufferToTexture inst param1 param2 param3 param4 =
+  liftIO $ wgpuCommandEncoderCopyBufferToTextureIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuCommandEncoderCopyBufferToTexture #-}
+
+wgpuCommandEncoderCopyTextureToTexture :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> m (())
+wgpuCommandEncoderCopyTextureToTexture inst param1 param2 param3 param4 =
+  liftIO $ wgpuCommandEncoderCopyTextureToTextureIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuCommandEncoderCopyTextureToTexture #-}
+
+wgpuCommandEncoderCopyTextureToBuffer :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUExtent3D) -> m (())
+wgpuCommandEncoderCopyTextureToBuffer inst param1 param2 param3 param4 =
+  liftIO $ wgpuCommandEncoderCopyTextureToBufferIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuCommandEncoderCopyTextureToBuffer #-}
+
+wgpuCommandEncoderFinish :: (MonadIO m) => WGPUHsInstance -> WGPUCommandEncoder -> Ptr (WGPUCommandBufferDescriptor) -> m (WGPUCommandBuffer)
+wgpuCommandEncoderFinish inst param1 param2 =
+  liftIO $ wgpuCommandEncoderFinishIO inst param1 param2
+{-# INLINEABLE wgpuCommandEncoderFinish #-}
+
+wgpuComputePassEncoderDispatch :: (MonadIO m) => WGPUHsInstance -> WGPUComputePassEncoder -> Word32 -> Word32 -> Word32 -> m (())
+wgpuComputePassEncoderDispatch inst param1 param2 param3 param4 =
+  liftIO $ wgpuComputePassEncoderDispatchIO inst param1 param2 param3 param4
+{-# INLINEABLE wgpuComputePassEncoderDispatch #-}
+
+wgpuComputePassEncoderDispatchIndirect :: (MonadIO m) => WGPUHsInstance -> WGPUComputePassEncoder -> WGPUBuffer -> Word64 -> m (())
+wgpuComputePassEncoderDispatchIndirect inst param1 param2 param3 =
+  liftIO $ wgpuComputePassEncoderDispatchIndirectIO inst param1 param2 param3
+{-# INLINEABLE wgpuComputePassEncoderDispatchIndirect #-}
+
+wgpuComputePassEncoderEndPass :: (MonadIO m) => WGPUHsInstance -> WGPUComputePassEncoder -> m (())
+wgpuComputePassEncoderEndPass inst param1 =
+  liftIO $ wgpuComputePassEncoderEndPassIO inst param1
+{-# INLINEABLE wgpuComputePassEncoderEndPass #-}
+
+wgpuComputePassEncoderSetBindGroup :: (MonadIO m) => WGPUHsInstance -> WGPUComputePassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> m (())
+wgpuComputePassEncoderSetBindGroup inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuComputePassEncoderSetBindGroupIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuComputePassEncoderSetBindGroup #-}
+
+wgpuComputePassEncoderSetPipeline :: (MonadIO m) => WGPUHsInstance -> WGPUComputePassEncoder -> WGPUComputePipeline -> m (())
+wgpuComputePassEncoderSetPipeline inst param1 param2 =
+  liftIO $ wgpuComputePassEncoderSetPipelineIO inst param1 param2
+{-# INLINEABLE wgpuComputePassEncoderSetPipeline #-}
+
+wgpuDeviceCreateBindGroup :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUBindGroupDescriptor) -> m (WGPUBindGroup)
+wgpuDeviceCreateBindGroup inst param1 param2 =
+  liftIO $ wgpuDeviceCreateBindGroupIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateBindGroup #-}
+
+wgpuDeviceCreateBindGroupLayout :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUBindGroupLayoutDescriptor) -> m (WGPUBindGroupLayout)
+wgpuDeviceCreateBindGroupLayout inst param1 param2 =
+  liftIO $ wgpuDeviceCreateBindGroupLayoutIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateBindGroupLayout #-}
+
+wgpuDeviceCreateBuffer :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUBufferDescriptor) -> m (WGPUBuffer)
+wgpuDeviceCreateBuffer inst param1 param2 =
+  liftIO $ wgpuDeviceCreateBufferIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateBuffer #-}
+
+wgpuDeviceCreateCommandEncoder :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUCommandEncoderDescriptor) -> m (WGPUCommandEncoder)
+wgpuDeviceCreateCommandEncoder inst param1 param2 =
+  liftIO $ wgpuDeviceCreateCommandEncoderIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateCommandEncoder #-}
+
+wgpuDeviceCreateComputePipeline :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUComputePipelineDescriptor) -> m (WGPUComputePipeline)
+wgpuDeviceCreateComputePipeline inst param1 param2 =
+  liftIO $ wgpuDeviceCreateComputePipelineIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateComputePipeline #-}
+
+wgpuDeviceCreatePipelineLayout :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUPipelineLayoutDescriptor) -> m (WGPUPipelineLayout)
+wgpuDeviceCreatePipelineLayout inst param1 param2 =
+  liftIO $ wgpuDeviceCreatePipelineLayoutIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreatePipelineLayout #-}
+
+wgpuDeviceCreateRenderPipeline :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPURenderPipelineDescriptor) -> m (WGPURenderPipeline)
+wgpuDeviceCreateRenderPipeline inst param1 param2 =
+  liftIO $ wgpuDeviceCreateRenderPipelineIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateRenderPipeline #-}
+
+wgpuDeviceCreateSampler :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUSamplerDescriptor) -> m (WGPUSampler)
+wgpuDeviceCreateSampler inst param1 param2 =
+  liftIO $ wgpuDeviceCreateSamplerIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateSampler #-}
+
+wgpuDeviceCreateShaderModule :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUShaderModuleDescriptor) -> m (WGPUShaderModule)
+wgpuDeviceCreateShaderModule inst param1 param2 =
+  liftIO $ wgpuDeviceCreateShaderModuleIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateShaderModule #-}
+
+wgpuDeviceCreateSwapChain :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> WGPUSurface -> Ptr (WGPUSwapChainDescriptor) -> m (WGPUSwapChain)
+wgpuDeviceCreateSwapChain inst param1 param2 param3 =
+  liftIO $ wgpuDeviceCreateSwapChainIO inst param1 param2 param3
+{-# INLINEABLE wgpuDeviceCreateSwapChain #-}
+
+wgpuDeviceCreateTexture :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> Ptr (WGPUTextureDescriptor) -> m (WGPUTexture)
+wgpuDeviceCreateTexture inst param1 param2 =
+  liftIO $ wgpuDeviceCreateTextureIO inst param1 param2
+{-# INLINEABLE wgpuDeviceCreateTexture #-}
+
+wgpuDeviceGetQueue :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> m (WGPUQueue)
+wgpuDeviceGetQueue inst param1 =
+  liftIO $ wgpuDeviceGetQueueIO inst param1
+{-# INLINEABLE wgpuDeviceGetQueue #-}
+
+wgpuInstanceCreateSurface :: (MonadIO m) => WGPUHsInstance -> WGPUInstance -> Ptr (WGPUSurfaceDescriptor) -> m (WGPUSurface)
+wgpuInstanceCreateSurface inst param1 param2 =
+  liftIO $ wgpuInstanceCreateSurfaceIO inst param1 param2
+{-# INLINEABLE wgpuInstanceCreateSurface #-}
+
+wgpuQueueSubmit :: (MonadIO m) => WGPUHsInstance -> WGPUQueue -> Word32 -> Ptr (WGPUCommandBuffer) -> m (())
+wgpuQueueSubmit inst param1 param2 param3 =
+  liftIO $ wgpuQueueSubmitIO inst param1 param2 param3
+{-# INLINEABLE wgpuQueueSubmit #-}
+
+wgpuQueueWriteBuffer :: (MonadIO m) => WGPUHsInstance -> WGPUQueue -> WGPUBuffer -> Word64 -> Ptr (()) -> CSize -> m (())
+wgpuQueueWriteBuffer inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuQueueWriteBufferIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuQueueWriteBuffer #-}
+
+wgpuQueueWriteTexture :: (MonadIO m) => WGPUHsInstance -> WGPUQueue -> Ptr (WGPUImageCopyTexture) -> Ptr (()) -> CSize -> Ptr (WGPUTextureDataLayout) -> Ptr (WGPUExtent3D) -> m (())
+wgpuQueueWriteTexture inst param1 param2 param3 param4 param5 param6 =
+  liftIO $ wgpuQueueWriteTextureIO inst param1 param2 param3 param4 param5 param6
+{-# INLINEABLE wgpuQueueWriteTexture #-}
+
+wgpuRenderPassEncoderDraw :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> m (())
+wgpuRenderPassEncoderDraw inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuRenderPassEncoderDrawIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuRenderPassEncoderDraw #-}
+
+wgpuRenderPassEncoderDrawIndexed :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> m (())
+wgpuRenderPassEncoderDrawIndexed inst param1 param2 param3 param4 param5 param6 =
+  liftIO $ wgpuRenderPassEncoderDrawIndexedIO inst param1 param2 param3 param4 param5 param6
+{-# INLINEABLE wgpuRenderPassEncoderDrawIndexed #-}
+
+wgpuRenderPassEncoderDrawIndexedIndirect :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> m (())
+wgpuRenderPassEncoderDrawIndexedIndirect inst param1 param2 param3 =
+  liftIO $ wgpuRenderPassEncoderDrawIndexedIndirectIO inst param1 param2 param3
+{-# INLINEABLE wgpuRenderPassEncoderDrawIndexedIndirect #-}
+
+wgpuRenderPassEncoderDrawIndirect :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> m (())
+wgpuRenderPassEncoderDrawIndirect inst param1 param2 param3 =
+  liftIO $ wgpuRenderPassEncoderDrawIndirectIO inst param1 param2 param3
+{-# INLINEABLE wgpuRenderPassEncoderDrawIndirect #-}
+
+wgpuRenderPassEncoderEndPass :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> m (())
+wgpuRenderPassEncoderEndPass inst param1 =
+  liftIO $ wgpuRenderPassEncoderEndPassIO inst param1
+{-# INLINEABLE wgpuRenderPassEncoderEndPass #-}
+
+wgpuRenderPassEncoderSetBindGroup :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> m (())
+wgpuRenderPassEncoderSetBindGroup inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuRenderPassEncoderSetBindGroupIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuRenderPassEncoderSetBindGroup #-}
+
+wgpuRenderPassEncoderSetBlendConstant :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Ptr (WGPUColor) -> m (())
+wgpuRenderPassEncoderSetBlendConstant inst param1 param2 =
+  liftIO $ wgpuRenderPassEncoderSetBlendConstantIO inst param1 param2
+{-# INLINEABLE wgpuRenderPassEncoderSetBlendConstant #-}
+
+wgpuRenderPassEncoderSetIndexBuffer :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> WGPUBuffer -> WGPUIndexFormat -> Word64 -> Word64 -> m (())
+wgpuRenderPassEncoderSetIndexBuffer inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuRenderPassEncoderSetIndexBufferIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuRenderPassEncoderSetIndexBuffer #-}
+
+wgpuRenderPassEncoderSetPipeline :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> WGPURenderPipeline -> m (())
+wgpuRenderPassEncoderSetPipeline inst param1 param2 =
+  liftIO $ wgpuRenderPassEncoderSetPipelineIO inst param1 param2
+{-# INLINEABLE wgpuRenderPassEncoderSetPipeline #-}
+
+wgpuRenderPassEncoderSetScissorRect :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> m (())
+wgpuRenderPassEncoderSetScissorRect inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuRenderPassEncoderSetScissorRectIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuRenderPassEncoderSetScissorRect #-}
+
+wgpuRenderPassEncoderSetStencilReference :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Word32 -> m (())
+wgpuRenderPassEncoderSetStencilReference inst param1 param2 =
+  liftIO $ wgpuRenderPassEncoderSetStencilReferenceIO inst param1 param2
+{-# INLINEABLE wgpuRenderPassEncoderSetStencilReference #-}
+
+wgpuRenderPassEncoderSetVertexBuffer :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> Word32 -> WGPUBuffer -> Word64 -> Word64 -> m (())
+wgpuRenderPassEncoderSetVertexBuffer inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuRenderPassEncoderSetVertexBufferIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuRenderPassEncoderSetVertexBuffer #-}
+
+wgpuRenderPassEncoderSetViewport :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> m (())
+wgpuRenderPassEncoderSetViewport inst param1 param2 param3 param4 param5 param6 param7 =
+  liftIO $ wgpuRenderPassEncoderSetViewportIO inst param1 param2 param3 param4 param5 param6 param7
+{-# INLINEABLE wgpuRenderPassEncoderSetViewport #-}
+
+wgpuSwapChainGetCurrentTextureView :: (MonadIO m) => WGPUHsInstance -> WGPUSwapChain -> m (WGPUTextureView)
+wgpuSwapChainGetCurrentTextureView inst param1 =
+  liftIO $ wgpuSwapChainGetCurrentTextureViewIO inst param1
+{-# INLINEABLE wgpuSwapChainGetCurrentTextureView #-}
+
+wgpuSwapChainPresent :: (MonadIO m) => WGPUHsInstance -> WGPUSwapChain -> m (())
+wgpuSwapChainPresent inst param1 =
+  liftIO $ wgpuSwapChainPresentIO inst param1
+{-# INLINEABLE wgpuSwapChainPresent #-}
+
+wgpuTextureCreateView :: (MonadIO m) => WGPUHsInstance -> WGPUTexture -> Ptr (WGPUTextureViewDescriptor) -> m (WGPUTextureView)
+wgpuTextureCreateView inst param1 param2 =
+  liftIO $ wgpuTextureCreateViewIO inst param1 param2
+{-# INLINEABLE wgpuTextureCreateView #-}
+
+wgpuTextureDestroy :: (MonadIO m) => WGPUHsInstance -> WGPUTexture -> m (())
+wgpuTextureDestroy inst param1 =
+  liftIO $ wgpuTextureDestroyIO inst param1
+{-# INLINEABLE wgpuTextureDestroy #-}
+
+wgpuDevicePoll :: (MonadIO m) => WGPUHsInstance -> WGPUDevice -> CBool -> m (())
+wgpuDevicePoll inst param1 param2 =
+  liftIO $ wgpuDevicePollIO inst param1 param2
+{-# INLINEABLE wgpuDevicePoll #-}
+
+wgpuSetLogCallback :: (MonadIO m) => WGPUHsInstance -> WGPULogCallback -> m (())
+wgpuSetLogCallback inst param1 =
+  liftIO $ wgpuSetLogCallbackIO inst param1
+{-# INLINEABLE wgpuSetLogCallback #-}
+
+wgpuSetLogLevel :: (MonadIO m) => WGPUHsInstance -> WGPULogLevel -> m (())
+wgpuSetLogLevel inst param1 =
+  liftIO $ wgpuSetLogLevelIO inst param1
+{-# INLINEABLE wgpuSetLogLevel #-}
+
+wgpuGetVersion :: (MonadIO m) => WGPUHsInstance -> m (Word32)
+wgpuGetVersion inst =
+  liftIO $ wgpuGetVersionIO inst
+{-# INLINEABLE wgpuGetVersion #-}
+
+wgpuRenderPassEncoderSetPushConstants :: (MonadIO m) => WGPUHsInstance -> WGPURenderPassEncoder -> WGPUShaderStage -> Word32 -> Word32 -> Ptr (()) -> m (())
+wgpuRenderPassEncoderSetPushConstants inst param1 param2 param3 param4 param5 =
+  liftIO $ wgpuRenderPassEncoderSetPushConstantsIO inst param1 param2 param3 param4 param5
+{-# INLINEABLE wgpuRenderPassEncoderSetPushConstants #-}
+
 loadDynamicInstance ::
   (forall a. String -> IO (FunPtr a)) ->
   IO WGPUHsInstance
 loadDynamicInstance load = do
-  wgpuAdapterGetProperties <- mk_wgpuhsfn_wgpuAdapterGetProperties <$> load "wgpuAdapterGetProperties"
-  wgpuAdapterRequestDevice <- mk_wgpuhsfn_wgpuAdapterRequestDevice <$> load "wgpuAdapterRequestDevice"
-  wgpuBufferDestroy <- mk_wgpuhsfn_wgpuBufferDestroy <$> load "wgpuBufferDestroy"
-  wgpuBufferGetMappedRange <- mk_wgpuhsfn_wgpuBufferGetMappedRange <$> load "wgpuBufferGetMappedRange"
-  wgpuBufferMapAsync <- mk_wgpuhsfn_wgpuBufferMapAsync <$> load "wgpuBufferMapAsync"
-  wgpuBufferUnmap <- mk_wgpuhsfn_wgpuBufferUnmap <$> load "wgpuBufferUnmap"
-  wgpuCommandEncoderBeginComputePass <- mk_wgpuhsfn_wgpuCommandEncoderBeginComputePass <$> load "wgpuCommandEncoderBeginComputePass"
-  wgpuCommandEncoderBeginRenderPass <- mk_wgpuhsfn_wgpuCommandEncoderBeginRenderPass <$> load "wgpuCommandEncoderBeginRenderPass"
-  wgpuCommandEncoderCopyBufferToBuffer <- mk_wgpuhsfn_wgpuCommandEncoderCopyBufferToBuffer <$> load "wgpuCommandEncoderCopyBufferToBuffer"
-  wgpuCommandEncoderCopyBufferToTexture <- mk_wgpuhsfn_wgpuCommandEncoderCopyBufferToTexture <$> load "wgpuCommandEncoderCopyBufferToTexture"
-  wgpuCommandEncoderCopyTextureToTexture <- mk_wgpuhsfn_wgpuCommandEncoderCopyTextureToTexture <$> load "wgpuCommandEncoderCopyTextureToTexture"
-  wgpuCommandEncoderCopyTextureToBuffer <- mk_wgpuhsfn_wgpuCommandEncoderCopyTextureToBuffer <$> load "wgpuCommandEncoderCopyTextureToBuffer"
-  wgpuCommandEncoderFinish <- mk_wgpuhsfn_wgpuCommandEncoderFinish <$> load "wgpuCommandEncoderFinish"
-  wgpuComputePassEncoderDispatch <- mk_wgpuhsfn_wgpuComputePassEncoderDispatch <$> load "wgpuComputePassEncoderDispatch"
-  wgpuComputePassEncoderDispatchIndirect <- mk_wgpuhsfn_wgpuComputePassEncoderDispatchIndirect <$> load "wgpuComputePassEncoderDispatchIndirect"
-  wgpuComputePassEncoderEndPass <- mk_wgpuhsfn_wgpuComputePassEncoderEndPass <$> load "wgpuComputePassEncoderEndPass"
-  wgpuComputePassEncoderSetBindGroup <- mk_wgpuhsfn_wgpuComputePassEncoderSetBindGroup <$> load "wgpuComputePassEncoderSetBindGroup"
-  wgpuComputePassEncoderSetPipeline <- mk_wgpuhsfn_wgpuComputePassEncoderSetPipeline <$> load "wgpuComputePassEncoderSetPipeline"
-  wgpuDeviceCreateBindGroup <- mk_wgpuhsfn_wgpuDeviceCreateBindGroup <$> load "wgpuDeviceCreateBindGroup"
-  wgpuDeviceCreateBindGroupLayout <- mk_wgpuhsfn_wgpuDeviceCreateBindGroupLayout <$> load "wgpuDeviceCreateBindGroupLayout"
-  wgpuDeviceCreateBuffer <- mk_wgpuhsfn_wgpuDeviceCreateBuffer <$> load "wgpuDeviceCreateBuffer"
-  wgpuDeviceCreateCommandEncoder <- mk_wgpuhsfn_wgpuDeviceCreateCommandEncoder <$> load "wgpuDeviceCreateCommandEncoder"
-  wgpuDeviceCreateComputePipeline <- mk_wgpuhsfn_wgpuDeviceCreateComputePipeline <$> load "wgpuDeviceCreateComputePipeline"
-  wgpuDeviceCreatePipelineLayout <- mk_wgpuhsfn_wgpuDeviceCreatePipelineLayout <$> load "wgpuDeviceCreatePipelineLayout"
-  wgpuDeviceCreateRenderPipeline <- mk_wgpuhsfn_wgpuDeviceCreateRenderPipeline <$> load "wgpuDeviceCreateRenderPipeline"
-  wgpuDeviceCreateSampler <- mk_wgpuhsfn_wgpuDeviceCreateSampler <$> load "wgpuDeviceCreateSampler"
-  wgpuDeviceCreateShaderModule <- mk_wgpuhsfn_wgpuDeviceCreateShaderModule <$> load "wgpuDeviceCreateShaderModule"
-  wgpuDeviceCreateSwapChain <- mk_wgpuhsfn_wgpuDeviceCreateSwapChain <$> load "wgpuDeviceCreateSwapChain"
-  wgpuDeviceCreateTexture <- mk_wgpuhsfn_wgpuDeviceCreateTexture <$> load "wgpuDeviceCreateTexture"
-  wgpuDeviceGetQueue <- mk_wgpuhsfn_wgpuDeviceGetQueue <$> load "wgpuDeviceGetQueue"
-  wgpuInstanceCreateSurface <- mk_wgpuhsfn_wgpuInstanceCreateSurface <$> load "wgpuInstanceCreateSurface"
-  wgpuInstanceRequestAdapter <- mk_wgpuhsfn_wgpuInstanceRequestAdapter <$> load "wgpuInstanceRequestAdapter"
-  wgpuQueueSubmit <- mk_wgpuhsfn_wgpuQueueSubmit <$> load "wgpuQueueSubmit"
-  wgpuQueueWriteBuffer <- mk_wgpuhsfn_wgpuQueueWriteBuffer <$> load "wgpuQueueWriteBuffer"
-  wgpuQueueWriteTexture <- mk_wgpuhsfn_wgpuQueueWriteTexture <$> load "wgpuQueueWriteTexture"
-  wgpuRenderPassEncoderDraw <- mk_wgpuhsfn_wgpuRenderPassEncoderDraw <$> load "wgpuRenderPassEncoderDraw"
-  wgpuRenderPassEncoderDrawIndexed <- mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndexed <$> load "wgpuRenderPassEncoderDrawIndexed"
-  wgpuRenderPassEncoderDrawIndexedIndirect <- mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndexedIndirect <$> load "wgpuRenderPassEncoderDrawIndexedIndirect"
-  wgpuRenderPassEncoderDrawIndirect <- mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndirect <$> load "wgpuRenderPassEncoderDrawIndirect"
-  wgpuRenderPassEncoderEndPass <- mk_wgpuhsfn_wgpuRenderPassEncoderEndPass <$> load "wgpuRenderPassEncoderEndPass"
-  wgpuRenderPassEncoderSetBindGroup <- mk_wgpuhsfn_wgpuRenderPassEncoderSetBindGroup <$> load "wgpuRenderPassEncoderSetBindGroup"
-  wgpuRenderPassEncoderSetBlendConstant <- mk_wgpuhsfn_wgpuRenderPassEncoderSetBlendConstant <$> load "wgpuRenderPassEncoderSetBlendConstant"
-  wgpuRenderPassEncoderSetIndexBuffer <- mk_wgpuhsfn_wgpuRenderPassEncoderSetIndexBuffer <$> load "wgpuRenderPassEncoderSetIndexBuffer"
-  wgpuRenderPassEncoderSetPipeline <- mk_wgpuhsfn_wgpuRenderPassEncoderSetPipeline <$> load "wgpuRenderPassEncoderSetPipeline"
-  wgpuRenderPassEncoderSetScissorRect <- mk_wgpuhsfn_wgpuRenderPassEncoderSetScissorRect <$> load "wgpuRenderPassEncoderSetScissorRect"
-  wgpuRenderPassEncoderSetStencilReference <- mk_wgpuhsfn_wgpuRenderPassEncoderSetStencilReference <$> load "wgpuRenderPassEncoderSetStencilReference"
-  wgpuRenderPassEncoderSetVertexBuffer <- mk_wgpuhsfn_wgpuRenderPassEncoderSetVertexBuffer <$> load "wgpuRenderPassEncoderSetVertexBuffer"
-  wgpuRenderPassEncoderSetViewport <- mk_wgpuhsfn_wgpuRenderPassEncoderSetViewport <$> load "wgpuRenderPassEncoderSetViewport"
-  wgpuSurfaceGetPreferredFormat <- mk_wgpuhsfn_wgpuSurfaceGetPreferredFormat <$> load "wgpuSurfaceGetPreferredFormat"
-  wgpuSwapChainGetCurrentTextureView <- mk_wgpuhsfn_wgpuSwapChainGetCurrentTextureView <$> load "wgpuSwapChainGetCurrentTextureView"
-  wgpuSwapChainPresent <- mk_wgpuhsfn_wgpuSwapChainPresent <$> load "wgpuSwapChainPresent"
-  wgpuTextureCreateView <- mk_wgpuhsfn_wgpuTextureCreateView <$> load "wgpuTextureCreateView"
-  wgpuTextureDestroy <- mk_wgpuhsfn_wgpuTextureDestroy <$> load "wgpuTextureDestroy"
-  wgpuDevicePoll <- mk_wgpuhsfn_wgpuDevicePoll <$> load "wgpuDevicePoll"
-  wgpuSetLogCallback <- mk_wgpuhsfn_wgpuSetLogCallback <$> load "wgpuSetLogCallback"
-  wgpuSetLogLevel <- mk_wgpuhsfn_wgpuSetLogLevel <$> load "wgpuSetLogLevel"
-  wgpuGetVersion <- mk_wgpuhsfn_wgpuGetVersion <$> load "wgpuGetVersion"
-  wgpuRenderPassEncoderSetPushConstants <- mk_wgpuhsfn_wgpuRenderPassEncoderSetPushConstants <$> load "wgpuRenderPassEncoderSetPushConstants"
+  wgpuAdapterRequestDeviceIO <- mk_wgpuhsfn_wgpuAdapterRequestDevice <$> load "wgpuAdapterRequestDevice"
+  wgpuBufferMapAsyncIO <- mk_wgpuhsfn_wgpuBufferMapAsync <$> load "wgpuBufferMapAsync"
+  wgpuInstanceRequestAdapterIO <- mk_wgpuhsfn_wgpuInstanceRequestAdapter <$> load "wgpuInstanceRequestAdapter"
+  wgpuSurfaceGetPreferredFormatIO <- mk_wgpuhsfn_wgpuSurfaceGetPreferredFormat <$> load "wgpuSurfaceGetPreferredFormat"
+  wgpuAdapterGetPropertiesIO <- mk_wgpuhsfn_wgpuAdapterGetProperties <$> load "wgpuAdapterGetProperties"
+  wgpuBufferDestroyIO <- mk_wgpuhsfn_wgpuBufferDestroy <$> load "wgpuBufferDestroy"
+  wgpuBufferGetMappedRangeIO <- mk_wgpuhsfn_wgpuBufferGetMappedRange <$> load "wgpuBufferGetMappedRange"
+  wgpuBufferUnmapIO <- mk_wgpuhsfn_wgpuBufferUnmap <$> load "wgpuBufferUnmap"
+  wgpuCommandEncoderBeginComputePassIO <- mk_wgpuhsfn_wgpuCommandEncoderBeginComputePass <$> load "wgpuCommandEncoderBeginComputePass"
+  wgpuCommandEncoderBeginRenderPassIO <- mk_wgpuhsfn_wgpuCommandEncoderBeginRenderPass <$> load "wgpuCommandEncoderBeginRenderPass"
+  wgpuCommandEncoderCopyBufferToBufferIO <- mk_wgpuhsfn_wgpuCommandEncoderCopyBufferToBuffer <$> load "wgpuCommandEncoderCopyBufferToBuffer"
+  wgpuCommandEncoderCopyBufferToTextureIO <- mk_wgpuhsfn_wgpuCommandEncoderCopyBufferToTexture <$> load "wgpuCommandEncoderCopyBufferToTexture"
+  wgpuCommandEncoderCopyTextureToTextureIO <- mk_wgpuhsfn_wgpuCommandEncoderCopyTextureToTexture <$> load "wgpuCommandEncoderCopyTextureToTexture"
+  wgpuCommandEncoderCopyTextureToBufferIO <- mk_wgpuhsfn_wgpuCommandEncoderCopyTextureToBuffer <$> load "wgpuCommandEncoderCopyTextureToBuffer"
+  wgpuCommandEncoderFinishIO <- mk_wgpuhsfn_wgpuCommandEncoderFinish <$> load "wgpuCommandEncoderFinish"
+  wgpuComputePassEncoderDispatchIO <- mk_wgpuhsfn_wgpuComputePassEncoderDispatch <$> load "wgpuComputePassEncoderDispatch"
+  wgpuComputePassEncoderDispatchIndirectIO <- mk_wgpuhsfn_wgpuComputePassEncoderDispatchIndirect <$> load "wgpuComputePassEncoderDispatchIndirect"
+  wgpuComputePassEncoderEndPassIO <- mk_wgpuhsfn_wgpuComputePassEncoderEndPass <$> load "wgpuComputePassEncoderEndPass"
+  wgpuComputePassEncoderSetBindGroupIO <- mk_wgpuhsfn_wgpuComputePassEncoderSetBindGroup <$> load "wgpuComputePassEncoderSetBindGroup"
+  wgpuComputePassEncoderSetPipelineIO <- mk_wgpuhsfn_wgpuComputePassEncoderSetPipeline <$> load "wgpuComputePassEncoderSetPipeline"
+  wgpuDeviceCreateBindGroupIO <- mk_wgpuhsfn_wgpuDeviceCreateBindGroup <$> load "wgpuDeviceCreateBindGroup"
+  wgpuDeviceCreateBindGroupLayoutIO <- mk_wgpuhsfn_wgpuDeviceCreateBindGroupLayout <$> load "wgpuDeviceCreateBindGroupLayout"
+  wgpuDeviceCreateBufferIO <- mk_wgpuhsfn_wgpuDeviceCreateBuffer <$> load "wgpuDeviceCreateBuffer"
+  wgpuDeviceCreateCommandEncoderIO <- mk_wgpuhsfn_wgpuDeviceCreateCommandEncoder <$> load "wgpuDeviceCreateCommandEncoder"
+  wgpuDeviceCreateComputePipelineIO <- mk_wgpuhsfn_wgpuDeviceCreateComputePipeline <$> load "wgpuDeviceCreateComputePipeline"
+  wgpuDeviceCreatePipelineLayoutIO <- mk_wgpuhsfn_wgpuDeviceCreatePipelineLayout <$> load "wgpuDeviceCreatePipelineLayout"
+  wgpuDeviceCreateRenderPipelineIO <- mk_wgpuhsfn_wgpuDeviceCreateRenderPipeline <$> load "wgpuDeviceCreateRenderPipeline"
+  wgpuDeviceCreateSamplerIO <- mk_wgpuhsfn_wgpuDeviceCreateSampler <$> load "wgpuDeviceCreateSampler"
+  wgpuDeviceCreateShaderModuleIO <- mk_wgpuhsfn_wgpuDeviceCreateShaderModule <$> load "wgpuDeviceCreateShaderModule"
+  wgpuDeviceCreateSwapChainIO <- mk_wgpuhsfn_wgpuDeviceCreateSwapChain <$> load "wgpuDeviceCreateSwapChain"
+  wgpuDeviceCreateTextureIO <- mk_wgpuhsfn_wgpuDeviceCreateTexture <$> load "wgpuDeviceCreateTexture"
+  wgpuDeviceGetQueueIO <- mk_wgpuhsfn_wgpuDeviceGetQueue <$> load "wgpuDeviceGetQueue"
+  wgpuInstanceCreateSurfaceIO <- mk_wgpuhsfn_wgpuInstanceCreateSurface <$> load "wgpuInstanceCreateSurface"
+  wgpuQueueSubmitIO <- mk_wgpuhsfn_wgpuQueueSubmit <$> load "wgpuQueueSubmit"
+  wgpuQueueWriteBufferIO <- mk_wgpuhsfn_wgpuQueueWriteBuffer <$> load "wgpuQueueWriteBuffer"
+  wgpuQueueWriteTextureIO <- mk_wgpuhsfn_wgpuQueueWriteTexture <$> load "wgpuQueueWriteTexture"
+  wgpuRenderPassEncoderDrawIO <- mk_wgpuhsfn_wgpuRenderPassEncoderDraw <$> load "wgpuRenderPassEncoderDraw"
+  wgpuRenderPassEncoderDrawIndexedIO <- mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndexed <$> load "wgpuRenderPassEncoderDrawIndexed"
+  wgpuRenderPassEncoderDrawIndexedIndirectIO <- mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndexedIndirect <$> load "wgpuRenderPassEncoderDrawIndexedIndirect"
+  wgpuRenderPassEncoderDrawIndirectIO <- mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndirect <$> load "wgpuRenderPassEncoderDrawIndirect"
+  wgpuRenderPassEncoderEndPassIO <- mk_wgpuhsfn_wgpuRenderPassEncoderEndPass <$> load "wgpuRenderPassEncoderEndPass"
+  wgpuRenderPassEncoderSetBindGroupIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetBindGroup <$> load "wgpuRenderPassEncoderSetBindGroup"
+  wgpuRenderPassEncoderSetBlendConstantIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetBlendConstant <$> load "wgpuRenderPassEncoderSetBlendConstant"
+  wgpuRenderPassEncoderSetIndexBufferIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetIndexBuffer <$> load "wgpuRenderPassEncoderSetIndexBuffer"
+  wgpuRenderPassEncoderSetPipelineIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetPipeline <$> load "wgpuRenderPassEncoderSetPipeline"
+  wgpuRenderPassEncoderSetScissorRectIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetScissorRect <$> load "wgpuRenderPassEncoderSetScissorRect"
+  wgpuRenderPassEncoderSetStencilReferenceIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetStencilReference <$> load "wgpuRenderPassEncoderSetStencilReference"
+  wgpuRenderPassEncoderSetVertexBufferIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetVertexBuffer <$> load "wgpuRenderPassEncoderSetVertexBuffer"
+  wgpuRenderPassEncoderSetViewportIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetViewport <$> load "wgpuRenderPassEncoderSetViewport"
+  wgpuSwapChainGetCurrentTextureViewIO <- mk_wgpuhsfn_wgpuSwapChainGetCurrentTextureView <$> load "wgpuSwapChainGetCurrentTextureView"
+  wgpuSwapChainPresentIO <- mk_wgpuhsfn_wgpuSwapChainPresent <$> load "wgpuSwapChainPresent"
+  wgpuTextureCreateViewIO <- mk_wgpuhsfn_wgpuTextureCreateView <$> load "wgpuTextureCreateView"
+  wgpuTextureDestroyIO <- mk_wgpuhsfn_wgpuTextureDestroy <$> load "wgpuTextureDestroy"
+  wgpuDevicePollIO <- mk_wgpuhsfn_wgpuDevicePoll <$> load "wgpuDevicePoll"
+  wgpuSetLogCallbackIO <- mk_wgpuhsfn_wgpuSetLogCallback <$> load "wgpuSetLogCallback"
+  wgpuSetLogLevelIO <- mk_wgpuhsfn_wgpuSetLogLevel <$> load "wgpuSetLogLevel"
+  wgpuGetVersionIO <- mk_wgpuhsfn_wgpuGetVersion <$> load "wgpuGetVersion"
+  wgpuRenderPassEncoderSetPushConstantsIO <- mk_wgpuhsfn_wgpuRenderPassEncoderSetPushConstants <$> load "wgpuRenderPassEncoderSetPushConstants"
   pure WGPUHsInstance {..}
 
-foreign import ccall "dynamic"
-  mk_wgpuhsfn_wgpuAdapterGetProperties :: FunPtr (WGPUAdapter -> Ptr (WGPUAdapterProperties) -> IO (())) -> WGPUAdapter -> Ptr (WGPUAdapterProperties) -> IO (())
-
-foreign import ccall "dynamic"
+foreign import ccall safe "dynamic"
   mk_wgpuhsfn_wgpuAdapterRequestDevice :: FunPtr (WGPUAdapter -> Ptr (WGPUDeviceDescriptor) -> WGPURequestDeviceCallback -> Ptr (()) -> IO (())) -> WGPUAdapter -> Ptr (WGPUDeviceDescriptor) -> WGPURequestDeviceCallback -> Ptr (()) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall safe "dynamic"
+  mk_wgpuhsfn_wgpuBufferMapAsync :: FunPtr (WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> IO (())) -> WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> IO (())
+
+foreign import ccall safe "dynamic"
+  mk_wgpuhsfn_wgpuInstanceRequestAdapter :: FunPtr (WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> IO (())) -> WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> IO (())
+
+foreign import ccall safe "dynamic"
+  mk_wgpuhsfn_wgpuSurfaceGetPreferredFormat :: FunPtr (WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> IO (())) -> WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> IO (())
+
+foreign import ccall unsafe "dynamic"
+  mk_wgpuhsfn_wgpuAdapterGetProperties :: FunPtr (WGPUAdapter -> Ptr (WGPUAdapterProperties) -> IO (())) -> WGPUAdapter -> Ptr (WGPUAdapterProperties) -> IO (())
+
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuBufferDestroy :: FunPtr (WGPUBuffer -> IO (())) -> WGPUBuffer -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuBufferGetMappedRange :: FunPtr (WGPUBuffer -> CSize -> CSize -> IO (Ptr (()))) -> WGPUBuffer -> CSize -> CSize -> IO (Ptr (()))
 
-foreign import ccall "dynamic"
-  mk_wgpuhsfn_wgpuBufferMapAsync :: FunPtr (WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> IO (())) -> WGPUBuffer -> WGPUMapModeFlags -> CSize -> CSize -> WGPUBufferMapCallback -> Ptr (()) -> IO (())
-
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuBufferUnmap :: FunPtr (WGPUBuffer -> IO (())) -> WGPUBuffer -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderBeginComputePass :: FunPtr (WGPUCommandEncoder -> Ptr (WGPUComputePassDescriptor) -> IO (WGPUComputePassEncoder)) -> WGPUCommandEncoder -> Ptr (WGPUComputePassDescriptor) -> IO (WGPUComputePassEncoder)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderBeginRenderPass :: FunPtr (WGPUCommandEncoder -> Ptr (WGPURenderPassDescriptor) -> IO (WGPURenderPassEncoder)) -> WGPUCommandEncoder -> Ptr (WGPURenderPassDescriptor) -> IO (WGPURenderPassEncoder)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderCopyBufferToBuffer :: FunPtr (WGPUCommandEncoder -> WGPUBuffer -> Word64 -> WGPUBuffer -> Word64 -> Word64 -> IO (())) -> WGPUCommandEncoder -> WGPUBuffer -> Word64 -> WGPUBuffer -> Word64 -> Word64 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderCopyBufferToTexture :: FunPtr (WGPUCommandEncoder -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (())) -> WGPUCommandEncoder -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderCopyTextureToTexture :: FunPtr (WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (())) -> WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUExtent3D) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderCopyTextureToBuffer :: FunPtr (WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUExtent3D) -> IO (())) -> WGPUCommandEncoder -> Ptr (WGPUImageCopyTexture) -> Ptr (WGPUImageCopyBuffer) -> Ptr (WGPUExtent3D) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuCommandEncoderFinish :: FunPtr (WGPUCommandEncoder -> Ptr (WGPUCommandBufferDescriptor) -> IO (WGPUCommandBuffer)) -> WGPUCommandEncoder -> Ptr (WGPUCommandBufferDescriptor) -> IO (WGPUCommandBuffer)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuComputePassEncoderDispatch :: FunPtr (WGPUComputePassEncoder -> Word32 -> Word32 -> Word32 -> IO (())) -> WGPUComputePassEncoder -> Word32 -> Word32 -> Word32 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuComputePassEncoderDispatchIndirect :: FunPtr (WGPUComputePassEncoder -> WGPUBuffer -> Word64 -> IO (())) -> WGPUComputePassEncoder -> WGPUBuffer -> Word64 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuComputePassEncoderEndPass :: FunPtr (WGPUComputePassEncoder -> IO (())) -> WGPUComputePassEncoder -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuComputePassEncoderSetBindGroup :: FunPtr (WGPUComputePassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (())) -> WGPUComputePassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuComputePassEncoderSetPipeline :: FunPtr (WGPUComputePassEncoder -> WGPUComputePipeline -> IO (())) -> WGPUComputePassEncoder -> WGPUComputePipeline -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateBindGroup :: FunPtr (WGPUDevice -> Ptr (WGPUBindGroupDescriptor) -> IO (WGPUBindGroup)) -> WGPUDevice -> Ptr (WGPUBindGroupDescriptor) -> IO (WGPUBindGroup)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateBindGroupLayout :: FunPtr (WGPUDevice -> Ptr (WGPUBindGroupLayoutDescriptor) -> IO (WGPUBindGroupLayout)) -> WGPUDevice -> Ptr (WGPUBindGroupLayoutDescriptor) -> IO (WGPUBindGroupLayout)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateBuffer :: FunPtr (WGPUDevice -> Ptr (WGPUBufferDescriptor) -> IO (WGPUBuffer)) -> WGPUDevice -> Ptr (WGPUBufferDescriptor) -> IO (WGPUBuffer)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateCommandEncoder :: FunPtr (WGPUDevice -> Ptr (WGPUCommandEncoderDescriptor) -> IO (WGPUCommandEncoder)) -> WGPUDevice -> Ptr (WGPUCommandEncoderDescriptor) -> IO (WGPUCommandEncoder)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateComputePipeline :: FunPtr (WGPUDevice -> Ptr (WGPUComputePipelineDescriptor) -> IO (WGPUComputePipeline)) -> WGPUDevice -> Ptr (WGPUComputePipelineDescriptor) -> IO (WGPUComputePipeline)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreatePipelineLayout :: FunPtr (WGPUDevice -> Ptr (WGPUPipelineLayoutDescriptor) -> IO (WGPUPipelineLayout)) -> WGPUDevice -> Ptr (WGPUPipelineLayoutDescriptor) -> IO (WGPUPipelineLayout)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateRenderPipeline :: FunPtr (WGPUDevice -> Ptr (WGPURenderPipelineDescriptor) -> IO (WGPURenderPipeline)) -> WGPUDevice -> Ptr (WGPURenderPipelineDescriptor) -> IO (WGPURenderPipeline)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateSampler :: FunPtr (WGPUDevice -> Ptr (WGPUSamplerDescriptor) -> IO (WGPUSampler)) -> WGPUDevice -> Ptr (WGPUSamplerDescriptor) -> IO (WGPUSampler)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateShaderModule :: FunPtr (WGPUDevice -> Ptr (WGPUShaderModuleDescriptor) -> IO (WGPUShaderModule)) -> WGPUDevice -> Ptr (WGPUShaderModuleDescriptor) -> IO (WGPUShaderModule)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateSwapChain :: FunPtr (WGPUDevice -> WGPUSurface -> Ptr (WGPUSwapChainDescriptor) -> IO (WGPUSwapChain)) -> WGPUDevice -> WGPUSurface -> Ptr (WGPUSwapChainDescriptor) -> IO (WGPUSwapChain)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceCreateTexture :: FunPtr (WGPUDevice -> Ptr (WGPUTextureDescriptor) -> IO (WGPUTexture)) -> WGPUDevice -> Ptr (WGPUTextureDescriptor) -> IO (WGPUTexture)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDeviceGetQueue :: FunPtr (WGPUDevice -> IO (WGPUQueue)) -> WGPUDevice -> IO (WGPUQueue)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuInstanceCreateSurface :: FunPtr (WGPUInstance -> Ptr (WGPUSurfaceDescriptor) -> IO (WGPUSurface)) -> WGPUInstance -> Ptr (WGPUSurfaceDescriptor) -> IO (WGPUSurface)
 
-foreign import ccall "dynamic"
-  mk_wgpuhsfn_wgpuInstanceRequestAdapter :: FunPtr (WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> IO (())) -> WGPUInstance -> Ptr (WGPURequestAdapterOptions) -> WGPURequestAdapterCallback -> Ptr (()) -> IO (())
-
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuQueueSubmit :: FunPtr (WGPUQueue -> Word32 -> Ptr (WGPUCommandBuffer) -> IO (())) -> WGPUQueue -> Word32 -> Ptr (WGPUCommandBuffer) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuQueueWriteBuffer :: FunPtr (WGPUQueue -> WGPUBuffer -> Word64 -> Ptr (()) -> CSize -> IO (())) -> WGPUQueue -> WGPUBuffer -> Word64 -> Ptr (()) -> CSize -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuQueueWriteTexture :: FunPtr (WGPUQueue -> Ptr (WGPUImageCopyTexture) -> Ptr (()) -> CSize -> Ptr (WGPUTextureDataLayout) -> Ptr (WGPUExtent3D) -> IO (())) -> WGPUQueue -> Ptr (WGPUImageCopyTexture) -> Ptr (()) -> CSize -> Ptr (WGPUTextureDataLayout) -> Ptr (WGPUExtent3D) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderDraw :: FunPtr (WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (())) -> WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndexed :: FunPtr (WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO (())) -> WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Int32 -> Word32 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndexedIndirect :: FunPtr (WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (())) -> WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderDrawIndirect :: FunPtr (WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (())) -> WGPURenderPassEncoder -> WGPUBuffer -> Word64 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderEndPass :: FunPtr (WGPURenderPassEncoder -> IO (())) -> WGPURenderPassEncoder -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetBindGroup :: FunPtr (WGPURenderPassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (())) -> WGPURenderPassEncoder -> Word32 -> WGPUBindGroup -> Word32 -> Ptr (Word32) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetBlendConstant :: FunPtr (WGPURenderPassEncoder -> Ptr (WGPUColor) -> IO (())) -> WGPURenderPassEncoder -> Ptr (WGPUColor) -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetIndexBuffer :: FunPtr (WGPURenderPassEncoder -> WGPUBuffer -> WGPUIndexFormat -> Word64 -> Word64 -> IO (())) -> WGPURenderPassEncoder -> WGPUBuffer -> WGPUIndexFormat -> Word64 -> Word64 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetPipeline :: FunPtr (WGPURenderPassEncoder -> WGPURenderPipeline -> IO (())) -> WGPURenderPassEncoder -> WGPURenderPipeline -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetScissorRect :: FunPtr (WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (())) -> WGPURenderPassEncoder -> Word32 -> Word32 -> Word32 -> Word32 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetStencilReference :: FunPtr (WGPURenderPassEncoder -> Word32 -> IO (())) -> WGPURenderPassEncoder -> Word32 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetVertexBuffer :: FunPtr (WGPURenderPassEncoder -> Word32 -> WGPUBuffer -> Word64 -> Word64 -> IO (())) -> WGPURenderPassEncoder -> Word32 -> WGPUBuffer -> Word64 -> Word64 -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetViewport :: FunPtr (WGPURenderPassEncoder -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO (())) -> WGPURenderPassEncoder -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> IO (())
 
-foreign import ccall "dynamic"
-  mk_wgpuhsfn_wgpuSurfaceGetPreferredFormat :: FunPtr (WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> IO (())) -> WGPUSurface -> WGPUAdapter -> WGPUSurfaceGetPreferredFormatCallback -> Ptr (()) -> IO (())
-
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuSwapChainGetCurrentTextureView :: FunPtr (WGPUSwapChain -> IO (WGPUTextureView)) -> WGPUSwapChain -> IO (WGPUTextureView)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuSwapChainPresent :: FunPtr (WGPUSwapChain -> IO (())) -> WGPUSwapChain -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuTextureCreateView :: FunPtr (WGPUTexture -> Ptr (WGPUTextureViewDescriptor) -> IO (WGPUTextureView)) -> WGPUTexture -> Ptr (WGPUTextureViewDescriptor) -> IO (WGPUTextureView)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuTextureDestroy :: FunPtr (WGPUTexture -> IO (())) -> WGPUTexture -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuDevicePoll :: FunPtr (WGPUDevice -> CBool -> IO (())) -> WGPUDevice -> CBool -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuSetLogCallback :: FunPtr (WGPULogCallback -> IO (())) -> WGPULogCallback -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuSetLogLevel :: FunPtr (WGPULogLevel -> IO (())) -> WGPULogLevel -> IO (())
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuGetVersion :: FunPtr (IO (Word32)) -> IO (Word32)
 
-foreign import ccall "dynamic"
+foreign import ccall unsafe "dynamic"
   mk_wgpuhsfn_wgpuRenderPassEncoderSetPushConstants :: FunPtr (WGPURenderPassEncoder -> WGPUShaderStage -> Word32 -> Word32 -> Ptr (()) -> IO (())) -> WGPURenderPassEncoder -> WGPUShaderStage -> Word32 -> Word32 -> Ptr (()) -> IO (())
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUAdapterExtras.hsc b/src/WGPU/Raw/Generated/Struct/WGPUAdapterExtras.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUAdapterExtras.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUAdapterExtras.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,11 +27,15 @@
 
 instance Storable WGPUAdapterExtras where
   sizeOf _ = (#size WGPUAdapterExtras)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUAdapterExtras, chain) ptr
     backend <- (#peek WGPUAdapterExtras, backend) ptr
     pure $! WGPUAdapterExtras{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUAdapterExtras{..} = do
     (#poke WGPUAdapterExtras, chain) ptr chain
     (#poke WGPUAdapterExtras, backend) ptr backend
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUAdapterProperties.hsc b/src/WGPU/Raw/Generated/Struct/WGPUAdapterProperties.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUAdapterProperties.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUAdapterProperties.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -33,7 +33,9 @@
 
 instance Storable WGPUAdapterProperties where
   sizeOf _ = (#size WGPUAdapterProperties)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUAdapterProperties, nextInChain) ptr
     deviceID <- (#peek WGPUAdapterProperties, deviceID) ptr
@@ -43,6 +45,7 @@
     adapterType <- (#peek WGPUAdapterProperties, adapterType) ptr
     backendType <- (#peek WGPUAdapterProperties, backendType) ptr
     pure $! WGPUAdapterProperties{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUAdapterProperties{..} = do
     (#poke WGPUAdapterProperties, nextInChain) ptr nextInChain
     (#poke WGPUAdapterProperties, deviceID) ptr deviceID
@@ -51,3 +54,4 @@
     (#poke WGPUAdapterProperties, driverDescription) ptr driverDescription
     (#poke WGPUAdapterProperties, adapterType) ptr adapterType
     (#poke WGPUAdapterProperties, backendType) ptr backendType
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -30,7 +30,9 @@
 
 instance Storable WGPUBindGroupDescriptor where
   sizeOf _ = (#size WGPUBindGroupDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUBindGroupDescriptor, nextInChain) ptr
     label <- (#peek WGPUBindGroupDescriptor, label) ptr
@@ -38,9 +40,11 @@
     entryCount <- (#peek WGPUBindGroupDescriptor, entryCount) ptr
     entries <- (#peek WGPUBindGroupDescriptor, entries) ptr
     pure $! WGPUBindGroupDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBindGroupDescriptor{..} = do
     (#poke WGPUBindGroupDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUBindGroupDescriptor, label) ptr label
     (#poke WGPUBindGroupDescriptor, layout) ptr layout
     (#poke WGPUBindGroupDescriptor, entryCount) ptr entryCount
     (#poke WGPUBindGroupDescriptor, entries) ptr entries
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupEntry.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupEntry.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupEntry.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupEntry.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -30,7 +30,9 @@
 
 instance Storable WGPUBindGroupEntry where
   sizeOf _ = (#size WGPUBindGroupEntry)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     binding <- (#peek WGPUBindGroupEntry, binding) ptr
     buffer <- (#peek WGPUBindGroupEntry, buffer) ptr
@@ -39,6 +41,7 @@
     sampler <- (#peek WGPUBindGroupEntry, sampler) ptr
     textureView <- (#peek WGPUBindGroupEntry, textureView) ptr
     pure $! WGPUBindGroupEntry{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBindGroupEntry{..} = do
     (#poke WGPUBindGroupEntry, binding) ptr binding
     (#poke WGPUBindGroupEntry, buffer) ptr buffer
@@ -46,3 +49,4 @@
     (#poke WGPUBindGroupEntry, size) ptr size
     (#poke WGPUBindGroupEntry, sampler) ptr sampler
     (#poke WGPUBindGroupEntry, textureView) ptr textureView
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -29,15 +29,19 @@
 
 instance Storable WGPUBindGroupLayoutDescriptor where
   sizeOf _ = (#size WGPUBindGroupLayoutDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUBindGroupLayoutDescriptor, nextInChain) ptr
     label <- (#peek WGPUBindGroupLayoutDescriptor, label) ptr
     entryCount <- (#peek WGPUBindGroupLayoutDescriptor, entryCount) ptr
     entries <- (#peek WGPUBindGroupLayoutDescriptor, entries) ptr
     pure $! WGPUBindGroupLayoutDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBindGroupLayoutDescriptor{..} = do
     (#poke WGPUBindGroupLayoutDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUBindGroupLayoutDescriptor, label) ptr label
     (#poke WGPUBindGroupLayoutDescriptor, entryCount) ptr entryCount
     (#poke WGPUBindGroupLayoutDescriptor, entries) ptr entries
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutEntry.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutEntry.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutEntry.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBindGroupLayoutEntry.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -35,7 +35,9 @@
 
 instance Storable WGPUBindGroupLayoutEntry where
   sizeOf _ = (#size WGPUBindGroupLayoutEntry)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUBindGroupLayoutEntry, nextInChain) ptr
     binding <- (#peek WGPUBindGroupLayoutEntry, binding) ptr
@@ -45,6 +47,7 @@
     texture <- (#peek WGPUBindGroupLayoutEntry, texture) ptr
     storageTexture <- (#peek WGPUBindGroupLayoutEntry, storageTexture) ptr
     pure $! WGPUBindGroupLayoutEntry{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBindGroupLayoutEntry{..} = do
     (#poke WGPUBindGroupLayoutEntry, nextInChain) ptr nextInChain
     (#poke WGPUBindGroupLayoutEntry, binding) ptr binding
@@ -53,3 +56,4 @@
     (#poke WGPUBindGroupLayoutEntry, sampler) ptr sampler
     (#poke WGPUBindGroupLayoutEntry, texture) ptr texture
     (#poke WGPUBindGroupLayoutEntry, storageTexture) ptr storageTexture
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBlendComponent.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -29,13 +29,17 @@
 
 instance Storable WGPUBlendComponent where
   sizeOf _ = (#size WGPUBlendComponent)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     srcFactor <- (#peek WGPUBlendComponent, srcFactor) ptr
     dstFactor <- (#peek WGPUBlendComponent, dstFactor) ptr
     operation <- (#peek WGPUBlendComponent, operation) ptr
     pure $! WGPUBlendComponent{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBlendComponent{..} = do
     (#poke WGPUBlendComponent, srcFactor) ptr srcFactor
     (#poke WGPUBlendComponent, dstFactor) ptr dstFactor
     (#poke WGPUBlendComponent, operation) ptr operation
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBlendState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,11 +27,15 @@
 
 instance Storable WGPUBlendState where
   sizeOf _ = (#size WGPUBlendState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     color <- (#peek WGPUBlendState, color) ptr
     alpha <- (#peek WGPUBlendState, alpha) ptr
     pure $! WGPUBlendState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBlendState{..} = do
     (#poke WGPUBlendState, color) ptr color
     (#poke WGPUBlendState, alpha) ptr alpha
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBufferBindingLayout.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBufferBindingLayout.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBufferBindingLayout.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBufferBindingLayout.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -29,15 +29,19 @@
 
 instance Storable WGPUBufferBindingLayout where
   sizeOf _ = (#size WGPUBufferBindingLayout)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUBufferBindingLayout, nextInChain) ptr
     typ <- (#peek WGPUBufferBindingLayout, type) ptr
     hasDynamicOffset <- (#peek WGPUBufferBindingLayout, hasDynamicOffset) ptr
     minBindingSize <- (#peek WGPUBufferBindingLayout, minBindingSize) ptr
     pure $! WGPUBufferBindingLayout{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBufferBindingLayout{..} = do
     (#poke WGPUBufferBindingLayout, nextInChain) ptr nextInChain
     (#poke WGPUBufferBindingLayout, type) ptr typ
     (#poke WGPUBufferBindingLayout, hasDynamicOffset) ptr hasDynamicOffset
     (#poke WGPUBufferBindingLayout, minBindingSize) ptr minBindingSize
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUBufferDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUBufferDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUBufferDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUBufferDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -29,7 +29,9 @@
 
 instance Storable WGPUBufferDescriptor where
   sizeOf _ = (#size WGPUBufferDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUBufferDescriptor, nextInChain) ptr
     label <- (#peek WGPUBufferDescriptor, label) ptr
@@ -37,9 +39,11 @@
     size <- (#peek WGPUBufferDescriptor, size) ptr
     mappedAtCreation <- (#peek WGPUBufferDescriptor, mappedAtCreation) ptr
     pure $! WGPUBufferDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUBufferDescriptor{..} = do
     (#poke WGPUBufferDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUBufferDescriptor, label) ptr label
     (#poke WGPUBufferDescriptor, usage) ptr usage
     (#poke WGPUBufferDescriptor, size) ptr size
     (#poke WGPUBufferDescriptor, mappedAtCreation) ptr mappedAtCreation
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUChainedStruct.hsc b/src/WGPU/Raw/Generated/Struct/WGPUChainedStruct.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUChainedStruct.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUChainedStruct.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUChainedStruct where
   sizeOf _ = (#size WGPUChainedStruct)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     next <- (#peek WGPUChainedStruct, next) ptr
     sType <- (#peek WGPUChainedStruct, sType) ptr
     pure $! WGPUChainedStruct{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUChainedStruct{..} = do
     (#poke WGPUChainedStruct, next) ptr next
     (#poke WGPUChainedStruct, sType) ptr sType
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUColor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUColor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUColor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUColor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -28,15 +28,19 @@
 
 instance Storable WGPUColor where
   sizeOf _ = (#size WGPUColor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     r <- (#peek WGPUColor, r) ptr
     g <- (#peek WGPUColor, g) ptr
     b <- (#peek WGPUColor, b) ptr
     a <- (#peek WGPUColor, a) ptr
     pure $! WGPUColor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUColor{..} = do
     (#poke WGPUColor, r) ptr r
     (#poke WGPUColor, g) ptr g
     (#poke WGPUColor, b) ptr b
     (#poke WGPUColor, a) ptr a
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUColorTargetState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -30,15 +30,19 @@
 
 instance Storable WGPUColorTargetState where
   sizeOf _ = (#size WGPUColorTargetState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUColorTargetState, nextInChain) ptr
     format <- (#peek WGPUColorTargetState, format) ptr
     blend <- (#peek WGPUColorTargetState, blend) ptr
     writeMask <- (#peek WGPUColorTargetState, writeMask) ptr
     pure $! WGPUColorTargetState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUColorTargetState{..} = do
     (#poke WGPUColorTargetState, nextInChain) ptr nextInChain
     (#poke WGPUColorTargetState, format) ptr format
     (#poke WGPUColorTargetState, blend) ptr blend
     (#poke WGPUColorTargetState, writeMask) ptr writeMask
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUCommandBufferDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUCommandBufferDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUCommandBufferDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUCommandBufferDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUCommandBufferDescriptor where
   sizeOf _ = (#size WGPUCommandBufferDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUCommandBufferDescriptor, nextInChain) ptr
     label <- (#peek WGPUCommandBufferDescriptor, label) ptr
     pure $! WGPUCommandBufferDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUCommandBufferDescriptor{..} = do
     (#poke WGPUCommandBufferDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUCommandBufferDescriptor, label) ptr label
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUCommandEncoderDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUCommandEncoderDescriptor where
   sizeOf _ = (#size WGPUCommandEncoderDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUCommandEncoderDescriptor, nextInChain) ptr
     label <- (#peek WGPUCommandEncoderDescriptor, label) ptr
     pure $! WGPUCommandEncoderDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUCommandEncoderDescriptor{..} = do
     (#poke WGPUCommandEncoderDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUCommandEncoderDescriptor, label) ptr label
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUComputePassDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUComputePassDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUComputePassDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUComputePassDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUComputePassDescriptor where
   sizeOf _ = (#size WGPUComputePassDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUComputePassDescriptor, nextInChain) ptr
     label <- (#peek WGPUComputePassDescriptor, label) ptr
     pure $! WGPUComputePassDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUComputePassDescriptor{..} = do
     (#poke WGPUComputePassDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUComputePassDescriptor, label) ptr label
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUComputePipelineDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUComputePipelineDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUComputePipelineDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUComputePipelineDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -29,15 +29,19 @@
 
 instance Storable WGPUComputePipelineDescriptor where
   sizeOf _ = (#size WGPUComputePipelineDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUComputePipelineDescriptor, nextInChain) ptr
     label <- (#peek WGPUComputePipelineDescriptor, label) ptr
     layout <- (#peek WGPUComputePipelineDescriptor, layout) ptr
     computeStage <- (#peek WGPUComputePipelineDescriptor, computeStage) ptr
     pure $! WGPUComputePipelineDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUComputePipelineDescriptor{..} = do
     (#poke WGPUComputePipelineDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUComputePipelineDescriptor, label) ptr label
     (#poke WGPUComputePipelineDescriptor, layout) ptr layout
     (#poke WGPUComputePipelineDescriptor, computeStage) ptr computeStage
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUDepthStencilState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -39,7 +39,9 @@
 
 instance Storable WGPUDepthStencilState where
   sizeOf _ = (#size WGPUDepthStencilState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUDepthStencilState, nextInChain) ptr
     format <- (#peek WGPUDepthStencilState, format) ptr
@@ -53,6 +55,7 @@
     depthBiasSlopeScale <- (#peek WGPUDepthStencilState, depthBiasSlopeScale) ptr
     depthBiasClamp <- (#peek WGPUDepthStencilState, depthBiasClamp) ptr
     pure $! WGPUDepthStencilState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUDepthStencilState{..} = do
     (#poke WGPUDepthStencilState, nextInChain) ptr nextInChain
     (#poke WGPUDepthStencilState, format) ptr format
@@ -65,3 +68,4 @@
     (#poke WGPUDepthStencilState, depthBias) ptr depthBias
     (#poke WGPUDepthStencilState, depthBiasSlopeScale) ptr depthBiasSlopeScale
     (#poke WGPUDepthStencilState, depthBiasClamp) ptr depthBiasClamp
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUDeviceDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUDeviceDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUDeviceDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUDeviceDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -25,9 +25,13 @@
 
 instance Storable WGPUDeviceDescriptor where
   sizeOf _ = (#size WGPUDeviceDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUDeviceDescriptor, nextInChain) ptr
     pure $! WGPUDeviceDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUDeviceDescriptor{..} = do
     (#poke WGPUDeviceDescriptor, nextInChain) ptr nextInChain
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUDeviceExtras.hsc b/src/WGPU/Raw/Generated/Struct/WGPUDeviceExtras.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUDeviceExtras.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUDeviceExtras.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -37,7 +37,9 @@
 
 instance Storable WGPUDeviceExtras where
   sizeOf _ = (#size WGPUDeviceExtras)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUDeviceExtras, chain) ptr
     maxTextureDimension1D <- (#peek WGPUDeviceExtras, maxTextureDimension1D) ptr
@@ -52,6 +54,7 @@
     label <- (#peek WGPUDeviceExtras, label) ptr
     tracePath <- (#peek WGPUDeviceExtras, tracePath) ptr
     pure $! WGPUDeviceExtras{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUDeviceExtras{..} = do
     (#poke WGPUDeviceExtras, chain) ptr chain
     (#poke WGPUDeviceExtras, maxTextureDimension1D) ptr maxTextureDimension1D
@@ -65,3 +68,4 @@
     (#poke WGPUDeviceExtras, nativeFeatures) ptr nativeFeatures
     (#poke WGPUDeviceExtras, label) ptr label
     (#poke WGPUDeviceExtras, tracePath) ptr tracePath
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc b/src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUExtent3D.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUExtent3D where
   sizeOf _ = (#size WGPUExtent3D)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     width <- (#peek WGPUExtent3D, width) ptr
     height <- (#peek WGPUExtent3D, height) ptr
     depthOrArrayLayers <- (#peek WGPUExtent3D, depthOrArrayLayers) ptr
     pure $! WGPUExtent3D{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUExtent3D{..} = do
     (#poke WGPUExtent3D, width) ptr width
     (#poke WGPUExtent3D, height) ptr height
     (#poke WGPUExtent3D, depthOrArrayLayers) ptr depthOrArrayLayers
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUFragmentState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -30,7 +30,9 @@
 
 instance Storable WGPUFragmentState where
   sizeOf _ = (#size WGPUFragmentState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUFragmentState, nextInChain) ptr
     shaderModule <- (#peek WGPUFragmentState, module) ptr
@@ -38,9 +40,11 @@
     targetCount <- (#peek WGPUFragmentState, targetCount) ptr
     targets <- (#peek WGPUFragmentState, targets) ptr
     pure $! WGPUFragmentState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUFragmentState{..} = do
     (#poke WGPUFragmentState, nextInChain) ptr nextInChain
     (#poke WGPUFragmentState, module) ptr shaderModule
     (#poke WGPUFragmentState, entryPoint) ptr entryPoint
     (#poke WGPUFragmentState, targetCount) ptr targetCount
     (#poke WGPUFragmentState, targets) ptr targets
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUImageCopyBuffer.hsc b/src/WGPU/Raw/Generated/Struct/WGPUImageCopyBuffer.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUImageCopyBuffer.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUImageCopyBuffer.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -28,13 +28,17 @@
 
 instance Storable WGPUImageCopyBuffer where
   sizeOf _ = (#size WGPUImageCopyBuffer)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUImageCopyBuffer, nextInChain) ptr
     layout <- (#peek WGPUImageCopyBuffer, layout) ptr
     buffer <- (#peek WGPUImageCopyBuffer, buffer) ptr
     pure $! WGPUImageCopyBuffer{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUImageCopyBuffer{..} = do
     (#poke WGPUImageCopyBuffer, nextInChain) ptr nextInChain
     (#poke WGPUImageCopyBuffer, layout) ptr layout
     (#poke WGPUImageCopyBuffer, buffer) ptr buffer
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUImageCopyTexture.hsc b/src/WGPU/Raw/Generated/Struct/WGPUImageCopyTexture.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUImageCopyTexture.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUImageCopyTexture.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -31,7 +31,9 @@
 
 instance Storable WGPUImageCopyTexture where
   sizeOf _ = (#size WGPUImageCopyTexture)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUImageCopyTexture, nextInChain) ptr
     texture <- (#peek WGPUImageCopyTexture, texture) ptr
@@ -39,9 +41,11 @@
     origin <- (#peek WGPUImageCopyTexture, origin) ptr
     aspect <- (#peek WGPUImageCopyTexture, aspect) ptr
     pure $! WGPUImageCopyTexture{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUImageCopyTexture{..} = do
     (#poke WGPUImageCopyTexture, nextInChain) ptr nextInChain
     (#poke WGPUImageCopyTexture, texture) ptr texture
     (#poke WGPUImageCopyTexture, mipLevel) ptr mipLevel
     (#poke WGPUImageCopyTexture, origin) ptr origin
     (#poke WGPUImageCopyTexture, aspect) ptr aspect
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUInstanceDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -25,9 +25,13 @@
 
 instance Storable WGPUInstanceDescriptor where
   sizeOf _ = (#size WGPUInstanceDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUInstanceDescriptor, nextInChain) ptr
     pure $! WGPUInstanceDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUInstanceDescriptor{..} = do
     (#poke WGPUInstanceDescriptor, nextInChain) ptr nextInChain
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUMultisampleState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUMultisampleState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUMultisampleState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUMultisampleState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -28,15 +28,19 @@
 
 instance Storable WGPUMultisampleState where
   sizeOf _ = (#size WGPUMultisampleState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUMultisampleState, nextInChain) ptr
     count <- (#peek WGPUMultisampleState, count) ptr
     mask <- (#peek WGPUMultisampleState, mask) ptr
     alphaToCoverageEnabled <- (#peek WGPUMultisampleState, alphaToCoverageEnabled) ptr
     pure $! WGPUMultisampleState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUMultisampleState{..} = do
     (#poke WGPUMultisampleState, nextInChain) ptr nextInChain
     (#poke WGPUMultisampleState, count) ptr count
     (#poke WGPUMultisampleState, mask) ptr mask
     (#poke WGPUMultisampleState, alphaToCoverageEnabled) ptr alphaToCoverageEnabled
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc b/src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUOrigin3D.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUOrigin3D where
   sizeOf _ = (#size WGPUOrigin3D)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     x <- (#peek WGPUOrigin3D, x) ptr
     y <- (#peek WGPUOrigin3D, y) ptr
     z <- (#peek WGPUOrigin3D, z) ptr
     pure $! WGPUOrigin3D{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUOrigin3D{..} = do
     (#poke WGPUOrigin3D, x) ptr x
     (#poke WGPUOrigin3D, y) ptr y
     (#poke WGPUOrigin3D, z) ptr z
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUPipelineLayoutDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUPipelineLayoutDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUPipelineLayoutDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUPipelineLayoutDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -28,15 +28,19 @@
 
 instance Storable WGPUPipelineLayoutDescriptor where
   sizeOf _ = (#size WGPUPipelineLayoutDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUPipelineLayoutDescriptor, nextInChain) ptr
     label <- (#peek WGPUPipelineLayoutDescriptor, label) ptr
     bindGroupLayoutCount <- (#peek WGPUPipelineLayoutDescriptor, bindGroupLayoutCount) ptr
     bindGroupLayouts <- (#peek WGPUPipelineLayoutDescriptor, bindGroupLayouts) ptr
     pure $! WGPUPipelineLayoutDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUPipelineLayoutDescriptor{..} = do
     (#poke WGPUPipelineLayoutDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUPipelineLayoutDescriptor, label) ptr label
     (#poke WGPUPipelineLayoutDescriptor, bindGroupLayoutCount) ptr bindGroupLayoutCount
     (#poke WGPUPipelineLayoutDescriptor, bindGroupLayouts) ptr bindGroupLayouts
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveDepthClampingState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUPrimitiveDepthClampingState where
   sizeOf _ = (#size WGPUPrimitiveDepthClampingState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUPrimitiveDepthClampingState, chain) ptr
     clampDepth <- (#peek WGPUPrimitiveDepthClampingState, clampDepth) ptr
     pure $! WGPUPrimitiveDepthClampingState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUPrimitiveDepthClampingState{..} = do
     (#poke WGPUPrimitiveDepthClampingState, chain) ptr chain
     (#poke WGPUPrimitiveDepthClampingState, clampDepth) ptr clampDepth
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUPrimitiveState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -33,7 +33,9 @@
 
 instance Storable WGPUPrimitiveState where
   sizeOf _ = (#size WGPUPrimitiveState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUPrimitiveState, nextInChain) ptr
     topology <- (#peek WGPUPrimitiveState, topology) ptr
@@ -41,9 +43,11 @@
     frontFace <- (#peek WGPUPrimitiveState, frontFace) ptr
     cullMode <- (#peek WGPUPrimitiveState, cullMode) ptr
     pure $! WGPUPrimitiveState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUPrimitiveState{..} = do
     (#poke WGPUPrimitiveState, nextInChain) ptr nextInChain
     (#poke WGPUPrimitiveState, topology) ptr topology
     (#poke WGPUPrimitiveState, stripIndexFormat) ptr stripIndexFormat
     (#poke WGPUPrimitiveState, frontFace) ptr frontFace
     (#poke WGPUPrimitiveState, cullMode) ptr cullMode
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUProgrammableStageDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUProgrammableStageDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUProgrammableStageDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUProgrammableStageDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUProgrammableStageDescriptor where
   sizeOf _ = (#size WGPUProgrammableStageDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUProgrammableStageDescriptor, nextInChain) ptr
     shaderModule <- (#peek WGPUProgrammableStageDescriptor, module) ptr
     entryPoint <- (#peek WGPUProgrammableStageDescriptor, entryPoint) ptr
     pure $! WGPUProgrammableStageDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUProgrammableStageDescriptor{..} = do
     (#poke WGPUProgrammableStageDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUProgrammableStageDescriptor, module) ptr shaderModule
     (#poke WGPUProgrammableStageDescriptor, entryPoint) ptr entryPoint
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUQuerySetDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -32,7 +32,9 @@
 
 instance Storable WGPUQuerySetDescriptor where
   sizeOf _ = (#size WGPUQuerySetDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUQuerySetDescriptor, nextInChain) ptr
     label <- (#peek WGPUQuerySetDescriptor, label) ptr
@@ -41,6 +43,7 @@
     pipelineStatistics <- (#peek WGPUQuerySetDescriptor, pipelineStatistics) ptr
     pipelineStatisticsCount <- (#peek WGPUQuerySetDescriptor, pipelineStatisticsCount) ptr
     pure $! WGPUQuerySetDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUQuerySetDescriptor{..} = do
     (#poke WGPUQuerySetDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUQuerySetDescriptor, label) ptr label
@@ -48,3 +51,4 @@
     (#poke WGPUQuerySetDescriptor, count) ptr count
     (#poke WGPUQuerySetDescriptor, pipelineStatistics) ptr pipelineStatistics
     (#poke WGPUQuerySetDescriptor, pipelineStatisticsCount) ptr pipelineStatisticsCount
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURenderBundleDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPURenderBundleDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURenderBundleDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURenderBundleDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPURenderBundleDescriptor where
   sizeOf _ = (#size WGPURenderBundleDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPURenderBundleDescriptor, nextInChain) ptr
     label <- (#peek WGPURenderBundleDescriptor, label) ptr
     pure $! WGPURenderBundleDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURenderBundleDescriptor{..} = do
     (#poke WGPURenderBundleDescriptor, nextInChain) ptr nextInChain
     (#poke WGPURenderBundleDescriptor, label) ptr label
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURenderBundleEncoderDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -32,7 +32,9 @@
 
 instance Storable WGPURenderBundleEncoderDescriptor where
   sizeOf _ = (#size WGPURenderBundleEncoderDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPURenderBundleEncoderDescriptor, nextInChain) ptr
     label <- (#peek WGPURenderBundleEncoderDescriptor, label) ptr
@@ -41,6 +43,7 @@
     depthStencilFormat <- (#peek WGPURenderBundleEncoderDescriptor, depthStencilFormat) ptr
     sampleCount <- (#peek WGPURenderBundleEncoderDescriptor, sampleCount) ptr
     pure $! WGPURenderBundleEncoderDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURenderBundleEncoderDescriptor{..} = do
     (#poke WGPURenderBundleEncoderDescriptor, nextInChain) ptr nextInChain
     (#poke WGPURenderBundleEncoderDescriptor, label) ptr label
@@ -48,3 +51,4 @@
     (#poke WGPURenderBundleEncoderDescriptor, colorFormats) ptr colorFormats
     (#poke WGPURenderBundleEncoderDescriptor, depthStencilFormat) ptr depthStencilFormat
     (#poke WGPURenderBundleEncoderDescriptor, sampleCount) ptr sampleCount
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc b/src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURenderPassColorAttachment.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -31,7 +31,9 @@
 
 instance Storable WGPURenderPassColorAttachment where
   sizeOf _ = (#size WGPURenderPassColorAttachment)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     view <- (#peek WGPURenderPassColorAttachment, view) ptr
     resolveTarget <- (#peek WGPURenderPassColorAttachment, resolveTarget) ptr
@@ -39,9 +41,11 @@
     storeOp <- (#peek WGPURenderPassColorAttachment, storeOp) ptr
     clearColor <- (#peek WGPURenderPassColorAttachment, clearColor) ptr
     pure $! WGPURenderPassColorAttachment{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURenderPassColorAttachment{..} = do
     (#poke WGPURenderPassColorAttachment, view) ptr view
     (#poke WGPURenderPassColorAttachment, resolveTarget) ptr resolveTarget
     (#poke WGPURenderPassColorAttachment, loadOp) ptr loadOp
     (#poke WGPURenderPassColorAttachment, storeOp) ptr storeOp
     (#poke WGPURenderPassColorAttachment, clearColor) ptr clearColor
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURenderPassDepthStencilAttachment.hsc b/src/WGPU/Raw/Generated/Struct/WGPURenderPassDepthStencilAttachment.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURenderPassDepthStencilAttachment.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURenderPassDepthStencilAttachment.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -36,7 +36,9 @@
 
 instance Storable WGPURenderPassDepthStencilAttachment where
   sizeOf _ = (#size WGPURenderPassDepthStencilAttachment)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     view <- (#peek WGPURenderPassDepthStencilAttachment, view) ptr
     depthLoadOp <- (#peek WGPURenderPassDepthStencilAttachment, depthLoadOp) ptr
@@ -48,6 +50,7 @@
     clearStencil <- (#peek WGPURenderPassDepthStencilAttachment, clearStencil) ptr
     stencilReadOnly <- (#peek WGPURenderPassDepthStencilAttachment, stencilReadOnly) ptr
     pure $! WGPURenderPassDepthStencilAttachment{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURenderPassDepthStencilAttachment{..} = do
     (#poke WGPURenderPassDepthStencilAttachment, view) ptr view
     (#poke WGPURenderPassDepthStencilAttachment, depthLoadOp) ptr depthLoadOp
@@ -58,3 +61,4 @@
     (#poke WGPURenderPassDepthStencilAttachment, stencilStoreOp) ptr stencilStoreOp
     (#poke WGPURenderPassDepthStencilAttachment, clearStencil) ptr clearStencil
     (#poke WGPURenderPassDepthStencilAttachment, stencilReadOnly) ptr stencilReadOnly
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURenderPassDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPURenderPassDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURenderPassDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURenderPassDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -32,7 +32,9 @@
 
 instance Storable WGPURenderPassDescriptor where
   sizeOf _ = (#size WGPURenderPassDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPURenderPassDescriptor, nextInChain) ptr
     label <- (#peek WGPURenderPassDescriptor, label) ptr
@@ -41,6 +43,7 @@
     depthStencilAttachment <- (#peek WGPURenderPassDescriptor, depthStencilAttachment) ptr
     occlusionQuerySet <- (#peek WGPURenderPassDescriptor, occlusionQuerySet) ptr
     pure $! WGPURenderPassDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURenderPassDescriptor{..} = do
     (#poke WGPURenderPassDescriptor, nextInChain) ptr nextInChain
     (#poke WGPURenderPassDescriptor, label) ptr label
@@ -48,3 +51,4 @@
     (#poke WGPURenderPassDescriptor, colorAttachments) ptr colorAttachments
     (#poke WGPURenderPassDescriptor, depthStencilAttachment) ptr depthStencilAttachment
     (#poke WGPURenderPassDescriptor, occlusionQuerySet) ptr occlusionQuerySet
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURenderPipelineDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPURenderPipelineDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURenderPipelineDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURenderPipelineDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -37,7 +37,9 @@
 
 instance Storable WGPURenderPipelineDescriptor where
   sizeOf _ = (#size WGPURenderPipelineDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPURenderPipelineDescriptor, nextInChain) ptr
     label <- (#peek WGPURenderPipelineDescriptor, label) ptr
@@ -48,6 +50,7 @@
     multisample <- (#peek WGPURenderPipelineDescriptor, multisample) ptr
     fragment <- (#peek WGPURenderPipelineDescriptor, fragment) ptr
     pure $! WGPURenderPipelineDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURenderPipelineDescriptor{..} = do
     (#poke WGPURenderPipelineDescriptor, nextInChain) ptr nextInChain
     (#poke WGPURenderPipelineDescriptor, label) ptr label
@@ -57,3 +60,4 @@
     (#poke WGPURenderPipelineDescriptor, depthStencil) ptr depthStencil
     (#poke WGPURenderPipelineDescriptor, multisample) ptr multisample
     (#poke WGPURenderPipelineDescriptor, fragment) ptr fragment
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPURequestAdapterOptions.hsc b/src/WGPU/Raw/Generated/Struct/WGPURequestAdapterOptions.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPURequestAdapterOptions.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPURequestAdapterOptions.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPURequestAdapterOptions where
   sizeOf _ = (#size WGPURequestAdapterOptions)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPURequestAdapterOptions, nextInChain) ptr
     compatibleSurface <- (#peek WGPURequestAdapterOptions, compatibleSurface) ptr
     pure $! WGPURequestAdapterOptions{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPURequestAdapterOptions{..} = do
     (#poke WGPURequestAdapterOptions, nextInChain) ptr nextInChain
     (#poke WGPURequestAdapterOptions, compatibleSurface) ptr compatibleSurface
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSamplerBindingLayout.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,11 +27,15 @@
 
 instance Storable WGPUSamplerBindingLayout where
   sizeOf _ = (#size WGPUSamplerBindingLayout)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUSamplerBindingLayout, nextInChain) ptr
     typ <- (#peek WGPUSamplerBindingLayout, type) ptr
     pure $! WGPUSamplerBindingLayout{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSamplerBindingLayout{..} = do
     (#poke WGPUSamplerBindingLayout, nextInChain) ptr nextInChain
     (#poke WGPUSamplerBindingLayout, type) ptr typ
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSamplerDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSamplerDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSamplerDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSamplerDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -43,7 +43,9 @@
 
 instance Storable WGPUSamplerDescriptor where
   sizeOf _ = (#size WGPUSamplerDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUSamplerDescriptor, nextInChain) ptr
     label <- (#peek WGPUSamplerDescriptor, label) ptr
@@ -58,6 +60,7 @@
     compare <- (#peek WGPUSamplerDescriptor, compare) ptr
     maxAnisotropy <- (#peek WGPUSamplerDescriptor, maxAnisotropy) ptr
     pure $! WGPUSamplerDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSamplerDescriptor{..} = do
     (#poke WGPUSamplerDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUSamplerDescriptor, label) ptr label
@@ -71,3 +74,4 @@
     (#poke WGPUSamplerDescriptor, lodMaxClamp) ptr lodMaxClamp
     (#poke WGPUSamplerDescriptor, compare) ptr compare
     (#poke WGPUSamplerDescriptor, maxAnisotropy) ptr maxAnisotropy
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUShaderModuleDescriptor where
   sizeOf _ = (#size WGPUShaderModuleDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUShaderModuleDescriptor, nextInChain) ptr
     label <- (#peek WGPUShaderModuleDescriptor, label) ptr
     pure $! WGPUShaderModuleDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUShaderModuleDescriptor{..} = do
     (#poke WGPUShaderModuleDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUShaderModuleDescriptor, label) ptr label
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleSPIRVDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleSPIRVDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleSPIRVDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleSPIRVDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUShaderModuleSPIRVDescriptor where
   sizeOf _ = (#size WGPUShaderModuleSPIRVDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUShaderModuleSPIRVDescriptor, chain) ptr
     codeSize <- (#peek WGPUShaderModuleSPIRVDescriptor, codeSize) ptr
     code <- (#peek WGPUShaderModuleSPIRVDescriptor, code) ptr
     pure $! WGPUShaderModuleSPIRVDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUShaderModuleSPIRVDescriptor{..} = do
     (#poke WGPUShaderModuleSPIRVDescriptor, chain) ptr chain
     (#poke WGPUShaderModuleSPIRVDescriptor, codeSize) ptr codeSize
     (#poke WGPUShaderModuleSPIRVDescriptor, code) ptr code
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleWGSLDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleWGSLDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleWGSLDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUShaderModuleWGSLDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUShaderModuleWGSLDescriptor where
   sizeOf _ = (#size WGPUShaderModuleWGSLDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUShaderModuleWGSLDescriptor, chain) ptr
     source <- (#peek WGPUShaderModuleWGSLDescriptor, source) ptr
     pure $! WGPUShaderModuleWGSLDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUShaderModuleWGSLDescriptor{..} = do
     (#poke WGPUShaderModuleWGSLDescriptor, chain) ptr chain
     (#poke WGPUShaderModuleWGSLDescriptor, source) ptr source
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUStencilFaceState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUStencilFaceState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUStencilFaceState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUStencilFaceState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -31,15 +31,19 @@
 
 instance Storable WGPUStencilFaceState where
   sizeOf _ = (#size WGPUStencilFaceState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     compare <- (#peek WGPUStencilFaceState, compare) ptr
     failOp <- (#peek WGPUStencilFaceState, failOp) ptr
     depthFailOp <- (#peek WGPUStencilFaceState, depthFailOp) ptr
     passOp <- (#peek WGPUStencilFaceState, passOp) ptr
     pure $! WGPUStencilFaceState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUStencilFaceState{..} = do
     (#poke WGPUStencilFaceState, compare) ptr compare
     (#poke WGPUStencilFaceState, failOp) ptr failOp
     (#poke WGPUStencilFaceState, depthFailOp) ptr depthFailOp
     (#poke WGPUStencilFaceState, passOp) ptr passOp
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc b/src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUStorageTextureBindingLayout.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -31,15 +31,19 @@
 
 instance Storable WGPUStorageTextureBindingLayout where
   sizeOf _ = (#size WGPUStorageTextureBindingLayout)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUStorageTextureBindingLayout, nextInChain) ptr
     access <- (#peek WGPUStorageTextureBindingLayout, access) ptr
     format <- (#peek WGPUStorageTextureBindingLayout, format) ptr
     viewDimension <- (#peek WGPUStorageTextureBindingLayout, viewDimension) ptr
     pure $! WGPUStorageTextureBindingLayout{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUStorageTextureBindingLayout{..} = do
     (#poke WGPUStorageTextureBindingLayout, nextInChain) ptr nextInChain
     (#poke WGPUStorageTextureBindingLayout, access) ptr access
     (#poke WGPUStorageTextureBindingLayout, format) ptr format
     (#poke WGPUStorageTextureBindingLayout, viewDimension) ptr viewDimension
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUSurfaceDescriptor where
   sizeOf _ = (#size WGPUSurfaceDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUSurfaceDescriptor, nextInChain) ptr
     label <- (#peek WGPUSurfaceDescriptor, label) ptr
     pure $! WGPUSurfaceDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSurfaceDescriptor{..} = do
     (#poke WGPUSurfaceDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUSurfaceDescriptor, label) ptr label
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromCanvasHTMLSelector.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromCanvasHTMLSelector.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromCanvasHTMLSelector.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromCanvasHTMLSelector.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUSurfaceDescriptorFromCanvasHTMLSelector where
   sizeOf _ = (#size WGPUSurfaceDescriptorFromCanvasHTMLSelector)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUSurfaceDescriptorFromCanvasHTMLSelector, chain) ptr
     selector <- (#peek WGPUSurfaceDescriptorFromCanvasHTMLSelector, selector) ptr
     pure $! WGPUSurfaceDescriptorFromCanvasHTMLSelector{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSurfaceDescriptorFromCanvasHTMLSelector{..} = do
     (#poke WGPUSurfaceDescriptorFromCanvasHTMLSelector, chain) ptr chain
     (#poke WGPUSurfaceDescriptorFromCanvasHTMLSelector, selector) ptr selector
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromMetalLayer.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromMetalLayer.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromMetalLayer.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromMetalLayer.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -26,11 +26,15 @@
 
 instance Storable WGPUSurfaceDescriptorFromMetalLayer where
   sizeOf _ = (#size WGPUSurfaceDescriptorFromMetalLayer)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUSurfaceDescriptorFromMetalLayer, chain) ptr
     layer <- (#peek WGPUSurfaceDescriptorFromMetalLayer, layer) ptr
     pure $! WGPUSurfaceDescriptorFromMetalLayer{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSurfaceDescriptorFromMetalLayer{..} = do
     (#poke WGPUSurfaceDescriptorFromMetalLayer, chain) ptr chain
     (#poke WGPUSurfaceDescriptorFromMetalLayer, layer) ptr layer
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromWindowsHWND.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromWindowsHWND.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromWindowsHWND.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromWindowsHWND.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUSurfaceDescriptorFromWindowsHWND where
   sizeOf _ = (#size WGPUSurfaceDescriptorFromWindowsHWND)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUSurfaceDescriptorFromWindowsHWND, chain) ptr
     hinstance <- (#peek WGPUSurfaceDescriptorFromWindowsHWND, hinstance) ptr
     hwnd <- (#peek WGPUSurfaceDescriptorFromWindowsHWND, hwnd) ptr
     pure $! WGPUSurfaceDescriptorFromWindowsHWND{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSurfaceDescriptorFromWindowsHWND{..} = do
     (#poke WGPUSurfaceDescriptorFromWindowsHWND, chain) ptr chain
     (#poke WGPUSurfaceDescriptorFromWindowsHWND, hinstance) ptr hinstance
     (#poke WGPUSurfaceDescriptorFromWindowsHWND, hwnd) ptr hwnd
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromXlib.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromXlib.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromXlib.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSurfaceDescriptorFromXlib.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUSurfaceDescriptorFromXlib where
   sizeOf _ = (#size WGPUSurfaceDescriptorFromXlib)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     chain <- (#peek WGPUSurfaceDescriptorFromXlib, chain) ptr
     display <- (#peek WGPUSurfaceDescriptorFromXlib, display) ptr
     window <- (#peek WGPUSurfaceDescriptorFromXlib, window) ptr
     pure $! WGPUSurfaceDescriptorFromXlib{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSurfaceDescriptorFromXlib{..} = do
     (#poke WGPUSurfaceDescriptorFromXlib, chain) ptr chain
     (#poke WGPUSurfaceDescriptorFromXlib, display) ptr display
     (#poke WGPUSurfaceDescriptorFromXlib, window) ptr window
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUSwapChainDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUSwapChainDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUSwapChainDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUSwapChainDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -33,7 +33,9 @@
 
 instance Storable WGPUSwapChainDescriptor where
   sizeOf _ = (#size WGPUSwapChainDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUSwapChainDescriptor, nextInChain) ptr
     label <- (#peek WGPUSwapChainDescriptor, label) ptr
@@ -43,6 +45,7 @@
     height <- (#peek WGPUSwapChainDescriptor, height) ptr
     presentMode <- (#peek WGPUSwapChainDescriptor, presentMode) ptr
     pure $! WGPUSwapChainDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUSwapChainDescriptor{..} = do
     (#poke WGPUSwapChainDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUSwapChainDescriptor, label) ptr label
@@ -51,3 +54,4 @@
     (#poke WGPUSwapChainDescriptor, width) ptr width
     (#poke WGPUSwapChainDescriptor, height) ptr height
     (#poke WGPUSwapChainDescriptor, presentMode) ptr presentMode
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc b/src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUTextureBindingLayout.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -30,15 +30,19 @@
 
 instance Storable WGPUTextureBindingLayout where
   sizeOf _ = (#size WGPUTextureBindingLayout)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUTextureBindingLayout, nextInChain) ptr
     sampleType <- (#peek WGPUTextureBindingLayout, sampleType) ptr
     viewDimension <- (#peek WGPUTextureBindingLayout, viewDimension) ptr
     multisampled <- (#peek WGPUTextureBindingLayout, multisampled) ptr
     pure $! WGPUTextureBindingLayout{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUTextureBindingLayout{..} = do
     (#poke WGPUTextureBindingLayout, nextInChain) ptr nextInChain
     (#poke WGPUTextureBindingLayout, sampleType) ptr sampleType
     (#poke WGPUTextureBindingLayout, viewDimension) ptr viewDimension
     (#poke WGPUTextureBindingLayout, multisampled) ptr multisampled
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUTextureDataLayout.hsc b/src/WGPU/Raw/Generated/Struct/WGPUTextureDataLayout.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUTextureDataLayout.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUTextureDataLayout.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -28,15 +28,19 @@
 
 instance Storable WGPUTextureDataLayout where
   sizeOf _ = (#size WGPUTextureDataLayout)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUTextureDataLayout, nextInChain) ptr
     offset <- (#peek WGPUTextureDataLayout, offset) ptr
     bytesPerRow <- (#peek WGPUTextureDataLayout, bytesPerRow) ptr
     rowsPerImage <- (#peek WGPUTextureDataLayout, rowsPerImage) ptr
     pure $! WGPUTextureDataLayout{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUTextureDataLayout{..} = do
     (#poke WGPUTextureDataLayout, nextInChain) ptr nextInChain
     (#poke WGPUTextureDataLayout, offset) ptr offset
     (#poke WGPUTextureDataLayout, bytesPerRow) ptr bytesPerRow
     (#poke WGPUTextureDataLayout, rowsPerImage) ptr rowsPerImage
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUTextureDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUTextureDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUTextureDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUTextureDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -35,7 +35,9 @@
 
 instance Storable WGPUTextureDescriptor where
   sizeOf _ = (#size WGPUTextureDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUTextureDescriptor, nextInChain) ptr
     label <- (#peek WGPUTextureDescriptor, label) ptr
@@ -46,6 +48,7 @@
     mipLevelCount <- (#peek WGPUTextureDescriptor, mipLevelCount) ptr
     sampleCount <- (#peek WGPUTextureDescriptor, sampleCount) ptr
     pure $! WGPUTextureDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUTextureDescriptor{..} = do
     (#poke WGPUTextureDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUTextureDescriptor, label) ptr label
@@ -55,3 +58,4 @@
     (#poke WGPUTextureDescriptor, format) ptr format
     (#poke WGPUTextureDescriptor, mipLevelCount) ptr mipLevelCount
     (#poke WGPUTextureDescriptor, sampleCount) ptr sampleCount
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUTextureViewDescriptor.hsc b/src/WGPU/Raw/Generated/Struct/WGPUTextureViewDescriptor.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUTextureViewDescriptor.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUTextureViewDescriptor.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -36,7 +36,9 @@
 
 instance Storable WGPUTextureViewDescriptor where
   sizeOf _ = (#size WGPUTextureViewDescriptor)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUTextureViewDescriptor, nextInChain) ptr
     label <- (#peek WGPUTextureViewDescriptor, label) ptr
@@ -48,6 +50,7 @@
     arrayLayerCount <- (#peek WGPUTextureViewDescriptor, arrayLayerCount) ptr
     aspect <- (#peek WGPUTextureViewDescriptor, aspect) ptr
     pure $! WGPUTextureViewDescriptor{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUTextureViewDescriptor{..} = do
     (#poke WGPUTextureViewDescriptor, nextInChain) ptr nextInChain
     (#poke WGPUTextureViewDescriptor, label) ptr label
@@ -58,3 +61,4 @@
     (#poke WGPUTextureViewDescriptor, baseArrayLayer) ptr baseArrayLayer
     (#poke WGPUTextureViewDescriptor, arrayLayerCount) ptr arrayLayerCount
     (#poke WGPUTextureViewDescriptor, aspect) ptr aspect
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUVertexAttribute.hsc b/src/WGPU/Raw/Generated/Struct/WGPUVertexAttribute.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUVertexAttribute.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUVertexAttribute.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -27,13 +27,17 @@
 
 instance Storable WGPUVertexAttribute where
   sizeOf _ = (#size WGPUVertexAttribute)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     format <- (#peek WGPUVertexAttribute, format) ptr
     offset <- (#peek WGPUVertexAttribute, offset) ptr
     shaderLocation <- (#peek WGPUVertexAttribute, shaderLocation) ptr
     pure $! WGPUVertexAttribute{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUVertexAttribute{..} = do
     (#poke WGPUVertexAttribute, format) ptr format
     (#poke WGPUVertexAttribute, offset) ptr offset
     (#poke WGPUVertexAttribute, shaderLocation) ptr shaderLocation
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUVertexBufferLayout.hsc b/src/WGPU/Raw/Generated/Struct/WGPUVertexBufferLayout.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUVertexBufferLayout.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUVertexBufferLayout.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -29,15 +29,19 @@
 
 instance Storable WGPUVertexBufferLayout where
   sizeOf _ = (#size WGPUVertexBufferLayout)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     arrayStride <- (#peek WGPUVertexBufferLayout, arrayStride) ptr
     stepMode <- (#peek WGPUVertexBufferLayout, stepMode) ptr
     attributeCount <- (#peek WGPUVertexBufferLayout, attributeCount) ptr
     attributes <- (#peek WGPUVertexBufferLayout, attributes) ptr
     pure $! WGPUVertexBufferLayout{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUVertexBufferLayout{..} = do
     (#poke WGPUVertexBufferLayout, arrayStride) ptr arrayStride
     (#poke WGPUVertexBufferLayout, stepMode) ptr stepMode
     (#poke WGPUVertexBufferLayout, attributeCount) ptr attributeCount
     (#poke WGPUVertexBufferLayout, attributes) ptr attributes
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Generated/Struct/WGPUVertexState.hsc b/src/WGPU/Raw/Generated/Struct/WGPUVertexState.hsc
--- a/src/WGPU/Raw/Generated/Struct/WGPUVertexState.hsc
+++ b/src/WGPU/Raw/Generated/Struct/WGPUVertexState.hsc
@@ -3,7 +3,7 @@
 {-# LANGUAGE NoImplicitPrelude #-}
 
 -- This file was generated by wgpu-raw-hs-codegen on:
---   2021-08-15T08:56:06.968390
+--   2021-08-25T10:02:03.522705
 -- Using wgpu-native git hash:
 --   b10496e7eed9349f0fd541e6dfe5029cb436de74 wgpu-native (v0.9.2.2)
 
@@ -30,7 +30,9 @@
 
 instance Storable WGPUVertexState where
   sizeOf _ = (#size WGPUVertexState)
+  {-# INLINABLE sizeOf #-}
   alignment = sizeOf
+  {-# INLINABLE alignment #-}
   peek ptr = do
     nextInChain <- (#peek WGPUVertexState, nextInChain) ptr
     shaderModule <- (#peek WGPUVertexState, module) ptr
@@ -38,9 +40,11 @@
     bufferCount <- (#peek WGPUVertexState, bufferCount) ptr
     buffers <- (#peek WGPUVertexState, buffers) ptr
     pure $! WGPUVertexState{..}
+  {-# INLINABLE peek #-}
   poke ptr WGPUVertexState{..} = do
     (#poke WGPUVertexState, nextInChain) ptr nextInChain
     (#poke WGPUVertexState, module) ptr shaderModule
     (#poke WGPUVertexState, entryPoint) ptr entryPoint
     (#poke WGPUVertexState, bufferCount) ptr bufferCount
     (#poke WGPUVertexState, buffers) ptr buffers
+  {-# INLINABLE poke #-}
diff --git a/src/WGPU/Raw/Log.hs b/src/WGPU/Raw/Log.hs
new file mode 100644
--- /dev/null
+++ b/src/WGPU/Raw/Log.hs
@@ -0,0 +1,31 @@
+{-# LANGUAGE ForeignFunctionInterface #-}
+
+module WGPU.Raw.Log
+  ( -- * Functions
+    connectLog,
+    disconnectLog,
+  )
+where
+
+import Control.Monad.IO.Class (MonadIO)
+import Foreign (nullFunPtr)
+import WGPU.Raw.Generated.Fun (WGPUHsInstance, wgpuSetLogCallback)
+import WGPU.Raw.Types (WGPULogCallback)
+
+-- | Connect the supplied logging function for logging to stdout.
+connectLog ::
+  MonadIO m =>
+  WGPUHsInstance ->
+  m ()
+connectLog inst = wgpuSetLogCallback inst wgpuhs_logging_callback
+
+-- | Disconnnect the supplied logging function for logging to stdout.
+disconnectLog ::
+  MonadIO m =>
+  WGPUHsInstance ->
+  m ()
+disconnectLog inst = wgpuSetLogCallback inst nullFunPtr
+
+foreign import ccall "&wgpuhs_logging_callback"
+  wgpuhs_logging_callback ::
+    WGPULogCallback
diff --git a/src/WGPU/Raw/SDLSurface.hs b/src/WGPU/Raw/SDLSurface.hs
new file mode 100644
--- /dev/null
+++ b/src/WGPU/Raw/SDLSurface.hs
@@ -0,0 +1,208 @@
+{-# LANGUAGE CPP #-}
+
+module WGPU.Raw.SDLSurface where
+
+import Control.Monad.IO.Class (MonadIO, liftIO)
+import Foreign (Ptr, alloca, castPtr, nullPtr, poke)
+import qualified SDL
+import Unsafe.Coerce (unsafeCoerce)
+import qualified WGPU.Raw.Generated.Enum.WGPUSType as WGPUSType
+import WGPU.Raw.Generated.Fun (WGPUHsInstance, wgpuInstanceCreateSurface)
+import WGPU.Raw.Generated.Struct.WGPUChainedStruct
+import WGPU.Raw.Generated.Struct.WGPUSurfaceDescriptor
+import WGPU.Raw.Types (WGPUInstance (WGPUInstance), WGPUSurface)
+
+#ifdef WGPUHS_TARGET_MACOS
+
+import WGPU.Raw.Generated.Struct.WGPUSurfaceDescriptorFromMetalLayer
+
+createSurface ::
+  MonadIO m =>
+  WGPUHsInstance ->
+  SDL.Window ->
+  m WGPUSurface
+createSurface inst window = liftIO $ do
+  nsWindow <- wgpuHsSDLToNSWindow (unsafeCoerce window)
+  metalLayer <- wgpuHsMetalLayer nsWindow
+
+  alloca $ \ptr_surfaceDescriptor -> do
+    alloca $ \ptr_chainedStruct -> do
+      alloca $ \ptr_surfaceDescriptorFromMetalLayer -> do
+
+        let surfaceDescriptorFromMetalLayer =
+              WGPUSurfaceDescriptorFromMetalLayer
+              { chain =
+                  WGPUChainedStruct
+                  { next = nullPtr,
+                    sType = WGPUSType.SurfaceDescriptorFromMetalLayer
+                  },
+                layer = metalLayer
+              }
+        poke ptr_surfaceDescriptorFromMetalLayer surfaceDescriptorFromMetalLayer
+
+        let chainedStruct =
+              WGPUChainedStruct
+              { next = castPtr ptr_surfaceDescriptorFromMetalLayer,
+                sType = WGPUSType.SurfaceDescriptorFromMetalLayer
+              }
+        poke ptr_chainedStruct chainedStruct
+
+        let surfaceDescriptor =
+              WGPUSurfaceDescriptor
+              { nextInChain = ptr_chainedStruct,
+                label = nullPtr
+              }
+        poke ptr_surfaceDescriptor surfaceDescriptor
+
+        wgpuInstanceCreateSurface
+          inst
+          (WGPUInstance nullPtr)
+          ptr_surfaceDescriptor
+
+wgpuHsSDLToNSWindow :: MonadIO m => Ptr () -> m (Ptr ())
+wgpuHsSDLToNSWindow = liftIO . wgpu_sdl_to_ns_window_IO
+
+foreign import ccall "wgpuhs_sdl_to_ns_window"
+  wgpu_sdl_to_ns_window_IO ::
+    Ptr () ->
+    IO (Ptr ())
+
+wgpuHsMetalLayer :: MonadIO m => Ptr () -> m (Ptr ())
+wgpuHsMetalLayer = liftIO . wgpuhs_metal_layer_IO
+
+foreign import ccall "wgpuhs_metal_layer"
+  wgpuhs_metal_layer_IO ::
+    Ptr () ->
+    IO (Ptr ())
+
+#endif
+
+#ifdef WGPUHS_TARGET_LINUX
+
+import Data.Word (Word32)
+import WGPU.Raw.Generated.Struct.WGPUSurfaceDescriptorFromXlib
+
+createSurface ::
+  MonadIO m =>
+  WGPUHsInstance ->
+  SDL.Window ->
+  m WGPUSurface
+createSurface inst sdlWin = liftIO $ do
+  x11Display <- wgpuHsSDLToX11Display (unsafeCoerce sdlWin)
+  x11Window <- wgpuHsSDLToX11Window (unsafeCoerce sdlWin)
+
+  alloca $ \ptr_surfaceDescriptor -> do
+    alloca $ \ptr_chainedStruct -> do
+      alloca $ \ptr_surfaceDescriptorFromXlib -> do
+
+        let surfaceDescriptorFromXlib =
+              WGPUSurfaceDescriptorFromXlib
+              { chain =
+                  WGPUChainedStruct
+                  { next = nullPtr,
+                    sType = WGPUSType.SurfaceDescriptorFromXlib
+                  },
+                display = x11Display,
+                window = fromIntegral x11Window
+              }
+        poke
+          ptr_surfaceDescriptorFromXlib
+          surfaceDescriptorFromXlib
+
+        let chainedStruct =
+             WGPUChainedStruct
+               { next = castPtr ptr_surfaceDescriptorFromXlib,
+                 sType = WGPUSType.SurfaceDescriptorFromXlib
+               }
+        poke ptr_chainedStruct chainedStruct
+
+        let surfaceDescriptor =
+              WGPUSurfaceDescriptor
+                { nextInChain = ptr_chainedStruct,
+                  label = nullPtr
+                }
+        poke ptr_surfaceDescriptor surfaceDescriptor
+
+        wgpuInstanceCreateSurface
+          inst
+          (WGPUInstance nullPtr)
+          ptr_surfaceDescriptor
+
+wgpuHsSDLToX11Window :: MonadIO m => Ptr () -> m Word32
+wgpuHsSDLToX11Window = liftIO . wgpu_sdl_to_x11_window_IO
+
+foreign import ccall "wgpuhs_sdl_to_x11_window"
+  wgpu_sdl_to_x11_window_IO ::
+    Ptr () ->
+    IO Word32
+
+wgpuHsSDLToX11Display :: MonadIO m => Ptr () -> m (Ptr ())
+wgpuHsSDLToX11Display = liftIO . wgpu_sdl_to_x11_display_IO
+
+foreign import ccall "wgpuhs_sdl_to_x11_display"
+  wgpu_sdl_to_x11_display_IO ::
+    Ptr () ->
+    IO (Ptr ())
+
+#endif
+
+#ifdef WGPUHS_TARGET_WINDOWS
+
+import System.Win32.DLL (getModuleHandle)
+import WGPU.Raw.Generated.Struct.WGPUSurfaceDescriptorFromWindowsHWND
+
+createSurface ::
+  MonadIO m =>
+  WGPUHsInstance ->
+  SDL.Window ->
+  m WGPUSurface
+createSurface inst window = liftIO $ do
+  hWnd <- wgpuHsSDLToHWnd (unsafeCoerce window)
+  hInstance <- getModuleHandle Nothing
+
+  alloca $ \ptr_surfaceDescriptor -> do
+    alloca $ \ptr_chainedStruct -> do
+      alloca $ \ptr_surfaceDescriptorFromWindowsHWND -> do
+
+        let surfaceDescriptorFromWindowsHWND =
+              WGPUSurfaceDescriptorFromWindowsHWND
+              { chain =
+                  WGPUChainedStruct
+                  { next = nullPtr,
+                    sType = WGPUSType.SurfaceDescriptorFromWindowsHWND
+                  },
+                hinstance = hInstance,
+                hwnd = hWnd
+              }
+        poke
+          ptr_surfaceDescriptorFromWindowsHWND
+          surfaceDescriptorFromWindowsHWND
+
+        let chainedStruct =
+              WGPUChainedStruct
+              { next = castPtr ptr_surfaceDescriptorFromWindowsHWND,
+                sType = WGPUSType.SurfaceDescriptorFromWindowsHWND
+              }
+        poke ptr_chainedStruct chainedStruct
+
+        let surfaceDescriptor =
+              WGPUSurfaceDescriptor
+              { nextInChain = ptr_chainedStruct,
+                label = nullPtr
+              }
+        poke ptr_surfaceDescriptor surfaceDescriptor
+
+        wgpuInstanceCreateSurface
+          inst
+          (WGPUInstance nullPtr)
+          ptr_surfaceDescriptor
+
+wgpuHsSDLToHWnd :: MonadIO m => Ptr () -> m (Ptr ())
+wgpuHsSDLToHWnd = liftIO . wgpuhs_sdl_to_hwnd_IO
+
+foreign import ccall "wgpuhs_sdl_to_hwnd"
+  wgpuhs_sdl_to_hwnd_IO ::
+    Ptr () ->
+    IO (Ptr ())
+
+#endif
diff --git a/wgpu-raw-hs.cabal b/wgpu-raw-hs.cabal
--- a/wgpu-raw-hs.cabal
+++ b/wgpu-raw-hs.cabal
@@ -1,12 +1,8 @@
 cabal-version:      3.0
 name:               wgpu-raw-hs
-version:            0.2.0.1
+version:            0.3.0.0
 synopsis:           WGPU Raw
-description:
-  A very low-level WGPU binding.
-  Currently, this package will only work properly on macOS. In the future,
-  support for Linux and Windows is planned.
-
+description:        A very low-level WGPU binding.
 bug-reports:        https://github.com/lancelet/wgpu-hs/issues
 license:            BSD-3-Clause
 license-file:       LICENSE
@@ -24,6 +20,11 @@
   default:     True
   manual:      True
 
+flag sdl2
+  description: Enable SDL2 integration
+  default:     True
+  manual:      True
+
 common base
   default-language: Haskell2010
   build-depends:    base ^>=4.14.0.0
@@ -36,6 +37,7 @@
 library
   import:          base, ghc-options
   include-dirs:    cbits
+  c-sources:       cbits/log.c
   hs-source-dirs:  src
   exposed-modules:
     WGPU.Raw.Dynamic
@@ -141,6 +143,7 @@
     WGPU.Raw.Generated.Struct.WGPUVertexAttribute
     WGPU.Raw.Generated.Struct.WGPUVertexBufferLayout
     WGPU.Raw.Generated.Struct.WGPUVertexState
+    WGPU.Raw.Log
     WGPU.Raw.Types
 
   if flag(glfw)
@@ -150,6 +153,24 @@
     if os(osx)
       c-sources:  cbits/surface-macos.m
       frameworks: AppKit QuartzCore
+
+  if flag(sdl2)
+    pkgconfig-depends: sdl2 >=2.0.6
+    build-depends:     sdl2 ^>=2.5.3.0
+    exposed-modules:   WGPU.Raw.SDLSurface
+
+    if os(osx)
+      c-sources:
+        cbits/sdl-surface-macos.m
+        cbits/surface-macos.m
+
+      frameworks: AppKit QuartzCore
+
+    if os(windows)
+      c-sources: cbits/sdl-surface-windows.c
+
+    if os(linux)
+      c-sources: cbits/sdl-surface-linux-x11.c
 
   if os(osx)
     cpp-options:   -DWGPUHS_UNIX -DWGPUHS_TARGET_MACOS
