packages feed

sdl3-bindgen-sys-0.0.0.1: sdl3-bindgen-sys.cabal

cabal-version: 2.2

-- This file has been generated from package.yaml by hpack version 0.39.6.
--
-- see: https://github.com/sol/hpack
--
-- hash: "v\192\194\247\225\129e\DEL\238^\168q\247\215\247M}\241\168\184~\192\216\DC1OG0W\EM/@\233"

name:           sdl3-bindgen-sys
version:        0.0.0.1
synopsis:       Complete SDL3 bindings, raw + curated, generated by hs-bindgen
description:    Machine-generated low-level bindings to the whole SDL 3.4 API: the raw
                hs-bindgen output (@SDL3.Sys.Bindgen.*@) plus a curated @SDL3.Sys@ layer
                with per-function safe/unsafe FFI decisions, typed constants, and native
                Haskell scalars. SDL's own header documentation rides along in the
                haddocks.
                .
                A generated translation unit of C @_Static_assert@s checks the baked
                layouts against your installed SDL at every build, so ABI divergence is
                a compile error rather than memory corruption.
                .
                Supports 64-bit Linux, macOS, and Windows, with SDL >= 3.2 development
                headers present. See the README for a quick start and the list of
                deliberate omissions.
category:       Graphics
homepage:       https://github.com/jtnuttall/lithon#readme
bug-reports:    https://github.com/jtnuttall/lithon/issues
author:         Jeremy Nuttall
maintainer:     jeremy@jeremy-nuttall.com
copyright:      (c) 2026 Jeremy Nuttall
license:        BSD-3-Clause
license-files:  LICENSE,
                LICENSE_SDL,
                LICENSE_hs-bindgen-runtime,
                LICENSE_c-expr-runtime
build-type:     Simple
tested-with:
    GHC == 9.8.* || == 9.10.* || == 9.12.*
extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
  type: git
  location: https://github.com/jtnuttall/lithon
  subdir: sdl3-bindgen-sys

flag abi-assertions
  description: Verify the baked ABI layout against the system SDL3 headers at build time
               via generated C static assertions (disable only to diagnose)
  manual: True
  default: True

flag optimize
  description: Build with -O2. Package ghc-options win over cabal's optimization setting, so use
               -f -optimize for faster iterative builds of this large package.
  manual: True
  default: True

flag optimize-aggressively
  description: Build with expensive optimizations. Consider this the release build: slow, but paid once if
               caching is set up, so it may be worth it for artifacts you intend to ship.
               .
               Currently: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams.
  manual: True
  default: False

flag strict
  description: EXPERIMENTAL: compile the generated modules with Strict.
               .
               The emitted hs-bindgen code has not been audited for laziness dependence; main library only.
               .
               NB: Implies StrictData (GHC semantics), so -f -strict-data does not undo strict fields.
  manual: True
  default: False

flag strict-data
  description: Compile the generated modules with StrictData (strict fields on every generated
               record). Main library only; the vendored runtime keeps its upstream semantics.
               Disable if you need lazy fields.
  manual: True
  default: True

library
  exposed-modules:
      SDL3.Sys
      SDL3.Sys.Assert
      SDL3.Sys.Asyncio
      SDL3.Sys.Atomic
      SDL3.Sys.Audio
      SDL3.Sys.Bindgen.Assert
      SDL3.Sys.Bindgen.Assert.FunPtr
      SDL3.Sys.Bindgen.Assert.Safe
      SDL3.Sys.Bindgen.Assert.Unsafe
      SDL3.Sys.Bindgen.Asyncio
      SDL3.Sys.Bindgen.Asyncio.FunPtr
      SDL3.Sys.Bindgen.Asyncio.Safe
      SDL3.Sys.Bindgen.Asyncio.Unsafe
      SDL3.Sys.Bindgen.Atomic
      SDL3.Sys.Bindgen.Atomic.FunPtr
      SDL3.Sys.Bindgen.Atomic.Safe
      SDL3.Sys.Bindgen.Atomic.Unsafe
      SDL3.Sys.Bindgen.Audio
      SDL3.Sys.Bindgen.Audio.FunPtr
      SDL3.Sys.Bindgen.Audio.Safe
      SDL3.Sys.Bindgen.Audio.Unsafe
      SDL3.Sys.Bindgen.Bits.FunPtr
      SDL3.Sys.Bindgen.Bits.Safe
      SDL3.Sys.Bindgen.Bits.Unsafe
      SDL3.Sys.Bindgen.Blendmode
      SDL3.Sys.Bindgen.Blendmode.FunPtr
      SDL3.Sys.Bindgen.Blendmode.Safe
      SDL3.Sys.Bindgen.Blendmode.Unsafe
      SDL3.Sys.Bindgen.Camera
      SDL3.Sys.Bindgen.Camera.FunPtr
      SDL3.Sys.Bindgen.Camera.Safe
      SDL3.Sys.Bindgen.Camera.Unsafe
      SDL3.Sys.Bindgen.Clipboard
      SDL3.Sys.Bindgen.Clipboard.FunPtr
      SDL3.Sys.Bindgen.Clipboard.Safe
      SDL3.Sys.Bindgen.Clipboard.Unsafe
      SDL3.Sys.Bindgen.Cpuinfo
      SDL3.Sys.Bindgen.Cpuinfo.FunPtr
      SDL3.Sys.Bindgen.Cpuinfo.Safe
      SDL3.Sys.Bindgen.Cpuinfo.Unsafe
      SDL3.Sys.Bindgen.Dialog
      SDL3.Sys.Bindgen.Dialog.FunPtr
      SDL3.Sys.Bindgen.Dialog.Safe
      SDL3.Sys.Bindgen.Dialog.Unsafe
      SDL3.Sys.Bindgen.Dlopennote
      SDL3.Sys.Bindgen.Endian
      SDL3.Sys.Bindgen.Endian.FunPtr
      SDL3.Sys.Bindgen.Endian.Safe
      SDL3.Sys.Bindgen.Endian.Unsafe
      SDL3.Sys.Bindgen.Error.FunPtr
      SDL3.Sys.Bindgen.Error.Safe
      SDL3.Sys.Bindgen.Error.Unsafe
      SDL3.Sys.Bindgen.Events
      SDL3.Sys.Bindgen.Events.FunPtr
      SDL3.Sys.Bindgen.Events.Safe
      SDL3.Sys.Bindgen.Events.Unsafe
      SDL3.Sys.Bindgen.Filesystem
      SDL3.Sys.Bindgen.Filesystem.FunPtr
      SDL3.Sys.Bindgen.Filesystem.Safe
      SDL3.Sys.Bindgen.Filesystem.Unsafe
      SDL3.Sys.Bindgen.Gamepad
      SDL3.Sys.Bindgen.Gamepad.FunPtr
      SDL3.Sys.Bindgen.Gamepad.Safe
      SDL3.Sys.Bindgen.Gamepad.Unsafe
      SDL3.Sys.Bindgen.Gpu
      SDL3.Sys.Bindgen.Gpu.FunPtr
      SDL3.Sys.Bindgen.Gpu.Safe
      SDL3.Sys.Bindgen.Gpu.Unsafe
      SDL3.Sys.Bindgen.Guid
      SDL3.Sys.Bindgen.Guid.FunPtr
      SDL3.Sys.Bindgen.Guid.Safe
      SDL3.Sys.Bindgen.Guid.Unsafe
      SDL3.Sys.Bindgen.Haptic
      SDL3.Sys.Bindgen.Haptic.FunPtr
      SDL3.Sys.Bindgen.Haptic.Safe
      SDL3.Sys.Bindgen.Haptic.Unsafe
      SDL3.Sys.Bindgen.Hidapi
      SDL3.Sys.Bindgen.Hidapi.FunPtr
      SDL3.Sys.Bindgen.Hidapi.Safe
      SDL3.Sys.Bindgen.Hidapi.Unsafe
      SDL3.Sys.Bindgen.Hints
      SDL3.Sys.Bindgen.Hints.FunPtr
      SDL3.Sys.Bindgen.Hints.Safe
      SDL3.Sys.Bindgen.Hints.Unsafe
      SDL3.Sys.Bindgen.Init
      SDL3.Sys.Bindgen.Init.FunPtr
      SDL3.Sys.Bindgen.Init.Safe
      SDL3.Sys.Bindgen.Init.Unsafe
      SDL3.Sys.Bindgen.Iostream
      SDL3.Sys.Bindgen.Iostream.FunPtr
      SDL3.Sys.Bindgen.Iostream.Safe
      SDL3.Sys.Bindgen.Iostream.Unsafe
      SDL3.Sys.Bindgen.Joystick
      SDL3.Sys.Bindgen.Joystick.FunPtr
      SDL3.Sys.Bindgen.Joystick.Safe
      SDL3.Sys.Bindgen.Joystick.Unsafe
      SDL3.Sys.Bindgen.Keyboard
      SDL3.Sys.Bindgen.Keyboard.FunPtr
      SDL3.Sys.Bindgen.Keyboard.Safe
      SDL3.Sys.Bindgen.Keyboard.Unsafe
      SDL3.Sys.Bindgen.Keycode
      SDL3.Sys.Bindgen.Loadso
      SDL3.Sys.Bindgen.Loadso.FunPtr
      SDL3.Sys.Bindgen.Loadso.Safe
      SDL3.Sys.Bindgen.Loadso.Unsafe
      SDL3.Sys.Bindgen.Locale
      SDL3.Sys.Bindgen.Locale.FunPtr
      SDL3.Sys.Bindgen.Locale.Safe
      SDL3.Sys.Bindgen.Locale.Unsafe
      SDL3.Sys.Bindgen.Log
      SDL3.Sys.Bindgen.Log.FunPtr
      SDL3.Sys.Bindgen.Log.Safe
      SDL3.Sys.Bindgen.Log.Unsafe
      SDL3.Sys.Bindgen.Main
      SDL3.Sys.Bindgen.Main.FunPtr
      SDL3.Sys.Bindgen.Main.Safe
      SDL3.Sys.Bindgen.Main.Unsafe
      SDL3.Sys.Bindgen.Messagebox
      SDL3.Sys.Bindgen.Messagebox.FunPtr
      SDL3.Sys.Bindgen.Messagebox.Safe
      SDL3.Sys.Bindgen.Messagebox.Unsafe
      SDL3.Sys.Bindgen.Metal
      SDL3.Sys.Bindgen.Metal.FunPtr
      SDL3.Sys.Bindgen.Metal.Safe
      SDL3.Sys.Bindgen.Metal.Unsafe
      SDL3.Sys.Bindgen.Misc.FunPtr
      SDL3.Sys.Bindgen.Misc.Safe
      SDL3.Sys.Bindgen.Misc.Unsafe
      SDL3.Sys.Bindgen.Mouse
      SDL3.Sys.Bindgen.Mouse.FunPtr
      SDL3.Sys.Bindgen.Mouse.Safe
      SDL3.Sys.Bindgen.Mouse.Unsafe
      SDL3.Sys.Bindgen.Mutex
      SDL3.Sys.Bindgen.Mutex.FunPtr
      SDL3.Sys.Bindgen.Mutex.Safe
      SDL3.Sys.Bindgen.Mutex.Unsafe
      SDL3.Sys.Bindgen.Pen
      SDL3.Sys.Bindgen.Pen.FunPtr
      SDL3.Sys.Bindgen.Pen.Safe
      SDL3.Sys.Bindgen.Pen.Unsafe
      SDL3.Sys.Bindgen.Pixels
      SDL3.Sys.Bindgen.Pixels.FunPtr
      SDL3.Sys.Bindgen.Pixels.Safe
      SDL3.Sys.Bindgen.Pixels.Unsafe
      SDL3.Sys.Bindgen.Platform.FunPtr
      SDL3.Sys.Bindgen.Platform.Safe
      SDL3.Sys.Bindgen.Platform.Unsafe
      SDL3.Sys.Bindgen.PlatformDefines
      SDL3.Sys.Bindgen.Power
      SDL3.Sys.Bindgen.Power.FunPtr
      SDL3.Sys.Bindgen.Power.Safe
      SDL3.Sys.Bindgen.Power.Unsafe
      SDL3.Sys.Bindgen.Process
      SDL3.Sys.Bindgen.Process.FunPtr
      SDL3.Sys.Bindgen.Process.Safe
      SDL3.Sys.Bindgen.Process.Unsafe
      SDL3.Sys.Bindgen.Properties
      SDL3.Sys.Bindgen.Properties.FunPtr
      SDL3.Sys.Bindgen.Properties.Safe
      SDL3.Sys.Bindgen.Properties.Unsafe
      SDL3.Sys.Bindgen.Rect
      SDL3.Sys.Bindgen.Rect.FunPtr
      SDL3.Sys.Bindgen.Rect.Safe
      SDL3.Sys.Bindgen.Rect.Unsafe
      SDL3.Sys.Bindgen.Render
      SDL3.Sys.Bindgen.Render.FunPtr
      SDL3.Sys.Bindgen.Render.Safe
      SDL3.Sys.Bindgen.Render.Unsafe
      SDL3.Sys.Bindgen.Runtime
      SDL3.Sys.Bindgen.Runtime.BitfieldPtr
      SDL3.Sys.Bindgen.Runtime.Block
      SDL3.Sys.Bindgen.Runtime.CBool
      SDL3.Sys.Bindgen.Runtime.CEnum
      SDL3.Sys.Bindgen.Runtime.CExpr
      SDL3.Sys.Bindgen.Runtime.ConstantArray
      SDL3.Sys.Bindgen.Runtime.FLAM
      SDL3.Sys.Bindgen.Runtime.HasCBitfield
      SDL3.Sys.Bindgen.Runtime.HasCField
      SDL3.Sys.Bindgen.Runtime.IncompleteArray
      SDL3.Sys.Bindgen.Runtime.IsArray
      SDL3.Sys.Bindgen.Runtime.Marshal
      SDL3.Sys.Bindgen.Runtime.PtrConst
      SDL3.Sys.Bindgen.Runtime.Union
      SDL3.Sys.Bindgen.Scancode
      SDL3.Sys.Bindgen.Sensor
      SDL3.Sys.Bindgen.Sensor.FunPtr
      SDL3.Sys.Bindgen.Sensor.Safe
      SDL3.Sys.Bindgen.Sensor.Unsafe
      SDL3.Sys.Bindgen.Stdinc
      SDL3.Sys.Bindgen.Stdinc.FunPtr
      SDL3.Sys.Bindgen.Stdinc.Safe
      SDL3.Sys.Bindgen.Stdinc.Unsafe
      SDL3.Sys.Bindgen.Storage
      SDL3.Sys.Bindgen.Storage.FunPtr
      SDL3.Sys.Bindgen.Storage.Safe
      SDL3.Sys.Bindgen.Storage.Unsafe
      SDL3.Sys.Bindgen.Surface
      SDL3.Sys.Bindgen.Surface.FunPtr
      SDL3.Sys.Bindgen.Surface.Safe
      SDL3.Sys.Bindgen.Surface.Unsafe
      SDL3.Sys.Bindgen.System
      SDL3.Sys.Bindgen.System.FunPtr
      SDL3.Sys.Bindgen.System.Safe
      SDL3.Sys.Bindgen.System.Unsafe
      SDL3.Sys.Bindgen.Thread
      SDL3.Sys.Bindgen.Thread.FunPtr
      SDL3.Sys.Bindgen.Thread.Safe
      SDL3.Sys.Bindgen.Thread.Unsafe
      SDL3.Sys.Bindgen.Time
      SDL3.Sys.Bindgen.Time.FunPtr
      SDL3.Sys.Bindgen.Time.Safe
      SDL3.Sys.Bindgen.Time.Unsafe
      SDL3.Sys.Bindgen.Timer
      SDL3.Sys.Bindgen.Timer.FunPtr
      SDL3.Sys.Bindgen.Timer.Safe
      SDL3.Sys.Bindgen.Timer.Unsafe
      SDL3.Sys.Bindgen.Touch
      SDL3.Sys.Bindgen.Touch.FunPtr
      SDL3.Sys.Bindgen.Touch.Safe
      SDL3.Sys.Bindgen.Touch.Unsafe
      SDL3.Sys.Bindgen.Tray
      SDL3.Sys.Bindgen.Tray.FunPtr
      SDL3.Sys.Bindgen.Tray.Safe
      SDL3.Sys.Bindgen.Tray.Unsafe
      SDL3.Sys.Bindgen.Version
      SDL3.Sys.Bindgen.Version.FunPtr
      SDL3.Sys.Bindgen.Version.Safe
      SDL3.Sys.Bindgen.Version.Unsafe
      SDL3.Sys.Bindgen.Video
      SDL3.Sys.Bindgen.Video.FunPtr
      SDL3.Sys.Bindgen.Video.Safe
      SDL3.Sys.Bindgen.Video.Unsafe
      SDL3.Sys.Bindgen.Vulkan
      SDL3.Sys.Bindgen.Vulkan.FunPtr
      SDL3.Sys.Bindgen.Vulkan.Safe
      SDL3.Sys.Bindgen.Vulkan.Unsafe
      SDL3.Sys.Bits
      SDL3.Sys.Blendmode
      SDL3.Sys.Camera
      SDL3.Sys.Clipboard
      SDL3.Sys.Cpuinfo
      SDL3.Sys.Dialog
      SDL3.Sys.Dlopennote
      SDL3.Sys.Endian
      SDL3.Sys.Error
      SDL3.Sys.Events
      SDL3.Sys.Filesystem
      SDL3.Sys.Gamepad
      SDL3.Sys.Gpu
      SDL3.Sys.Guid
      SDL3.Sys.Haptic
      SDL3.Sys.Hidapi
      SDL3.Sys.Hints
      SDL3.Sys.Init
      SDL3.Sys.Iostream
      SDL3.Sys.Joystick
      SDL3.Sys.Keyboard
      SDL3.Sys.Keycode
      SDL3.Sys.Loadso
      SDL3.Sys.Locale
      SDL3.Sys.Log
      SDL3.Sys.Main
      SDL3.Sys.Messagebox
      SDL3.Sys.Metal
      SDL3.Sys.Misc
      SDL3.Sys.Mouse
      SDL3.Sys.Mutex
      SDL3.Sys.Pen
      SDL3.Sys.Pixels
      SDL3.Sys.Platform
      SDL3.Sys.PlatformDefines
      SDL3.Sys.Power
      SDL3.Sys.Process
      SDL3.Sys.Properties
      SDL3.Sys.Rect
      SDL3.Sys.Render
      SDL3.Sys.Runtime
      SDL3.Sys.Scancode
      SDL3.Sys.Sensor
      SDL3.Sys.Stdinc
      SDL3.Sys.Storage
      SDL3.Sys.Surface
      SDL3.Sys.System
      SDL3.Sys.Thread
      SDL3.Sys.Time
      SDL3.Sys.Timer
      SDL3.Sys.Touch
      SDL3.Sys.Tray
      SDL3.Sys.Version
      SDL3.Sys.Video
      SDL3.Sys.Vulkan
  other-modules:
      Paths_sdl3_bindgen_sys
  autogen-modules:
      Paths_sdl3_bindgen_sys
  hs-source-dirs:
      src
  ghc-options: -optc-Wno-incompatible-pointer-types -optc-Wno-incompatible-function-pointer-types
  pkgconfig-depends:
      sdl3 >= 3.2
  build-depends:
      base >=4.17 && <4.23
    , bindgen-runtime
    , cexpr-runtime
  default-language: GHC2021
  if flag(abi-assertions)
    c-sources:
        cbits/abi_assertions.c
  if flag(strict-data)
    default-extensions:
        StrictData
  if flag(strict)
    default-extensions:
        Strict
  if flag(optimize)
    ghc-options: -O2
  if flag(optimize-aggressively)
    ghc-options: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams

library bindgen-runtime
  exposed-modules:
      HsBindgen.Runtime.BitfieldPtr
      HsBindgen.Runtime.Block
      HsBindgen.Runtime.CBool
      HsBindgen.Runtime.CEnum
      HsBindgen.Runtime.ConstantArray
      HsBindgen.Runtime.FLAM
      HsBindgen.Runtime.HasCBitfield
      HsBindgen.Runtime.HasCField
      HsBindgen.Runtime.IncompleteArray
      HsBindgen.Runtime.IsArray
      HsBindgen.Runtime.LibC
      HsBindgen.Runtime.Marshal
      HsBindgen.Runtime.Prelude
      HsBindgen.Runtime.PtrConst
      HsBindgen.Runtime.Support
      HsBindgen.Runtime.Support.Bitfield
      HsBindgen.Runtime.Support.ByteArray
      HsBindgen.Runtime.Support.CAPI
      HsBindgen.Runtime.Support.CompatHasField
      HsBindgen.Runtime.Support.FFIType
      HsBindgen.Runtime.Support.FunPtr
      HsBindgen.Runtime.Support.FunPtr.Class
      HsBindgen.Runtime.Support.HasFFIType
      HsBindgen.Runtime.Support.LibC.Auxiliary
      HsBindgen.Runtime.Support.Ptr
      HsBindgen.Runtime.Support.SizedByteArray
      HsBindgen.Runtime.Support.TH.Instances
      HsBindgen.Runtime.Support.TH.Types
      HsBindgen.Runtime.Union
  other-modules:
      Paths_sdl3_bindgen_sys
  autogen-modules:
      Paths_sdl3_bindgen_sys
  hs-source-dirs:
      runtime
  default-extensions:
      DataKinds
      DefaultSignatures
      DeriveAnyClass
      DerivingStrategies
      DerivingVia
      FunctionalDependencies
      LambdaCase
      PatternSynonyms
      RecordWildCards
      RoleAnnotations
      ScopedTypeVariables
      TypeFamilies
      UndecidableInstances
      ViewPatterns
  build-tool-depends:
      hsc2hs:hsc2hs
  build-depends:
      base >=4.17 && <4.23
    , bytestring >=0.11 && <0.13
    , containers >=0.6 && <0.9
    , primitive ==0.9.*
    , record-hasfield >=1.0 && <2
    , template-haskell >=2.18 && <2.25
    , vector ==0.13.*
  default-language: GHC2021
  if flag(optimize)
    ghc-options: -O2
  if flag(optimize-aggressively)
    ghc-options: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams

library cexpr-runtime
  exposed-modules:
      C.Expr.HostPlatform
      C.Expr.Posix32
      C.Expr.Posix64
      C.Expr.Win64
      C.Operator.Classes
      C.Operator.GenInstances
      C.Operator.Internal
      C.Operator.TH
      C.Operators
      C.Type
      C.Type.Internal.Universe
  other-modules:
      Paths_sdl3_bindgen_sys
  autogen-modules:
      Paths_sdl3_bindgen_sys
  hs-source-dirs:
      runtime-cexpr
  default-extensions:
      DataKinds
      DeriveGeneric
      DeriveTraversable
      DerivingStrategies
      FlexibleInstances
      GADTs
      ImportQualifiedPost
      LambdaCase
      MagicHash
      MultiParamTypeClasses
      ParallelListComp
      StandaloneKindSignatures
      TupleSections
      TypeApplications
      TypeFamilies
      TypeOperators
  build-depends:
      base >=4.17 && <4.23
    , containers >=0.5 && <0.9
    , fin >=0.3.2 && <0.4
    , some >=1.0.6 && <1.1
    , template-haskell >=2.18 && <2.25
    , vec ==0.5.*
  default-language: Haskell2010
  if flag(optimize)
    ghc-options: -O2
  if flag(optimize-aggressively)
    ghc-options: -O2 -fexpose-all-unfoldings -flate-specialise -flate-dmd-anal -fstg-lift-lams