sdl3-bindgen-sys: Complete SDL3 bindings, raw + curated, generated by hs-bindgen
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_asserts 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.
[Skip to Readme]
Modules
[Index] [Quick Jump]
- SDL3
- SDL3.Sys
- SDL3.Sys.Assert
- SDL3.Sys.Asyncio
- SDL3.Sys.Atomic
- SDL3.Sys.Audio
- Bindgen
- SDL3.Sys.Bindgen.Assert
- SDL3.Sys.Bindgen.Asyncio
- SDL3.Sys.Bindgen.Atomic
- SDL3.Sys.Bindgen.Audio
- Bits
- SDL3.Sys.Bindgen.Blendmode
- SDL3.Sys.Bindgen.Camera
- SDL3.Sys.Bindgen.Clipboard
- SDL3.Sys.Bindgen.Cpuinfo
- SDL3.Sys.Bindgen.Dialog
- SDL3.Sys.Bindgen.Dlopennote
- SDL3.Sys.Bindgen.Endian
- Error
- SDL3.Sys.Bindgen.Events
- SDL3.Sys.Bindgen.Filesystem
- SDL3.Sys.Bindgen.Gamepad
- SDL3.Sys.Bindgen.Gpu
- SDL3.Sys.Bindgen.Guid
- SDL3.Sys.Bindgen.Haptic
- SDL3.Sys.Bindgen.Hidapi
- SDL3.Sys.Bindgen.Hints
- SDL3.Sys.Bindgen.Init
- SDL3.Sys.Bindgen.Iostream
- SDL3.Sys.Bindgen.Joystick
- SDL3.Sys.Bindgen.Keyboard
- SDL3.Sys.Bindgen.Keycode
- SDL3.Sys.Bindgen.Loadso
- SDL3.Sys.Bindgen.Locale
- SDL3.Sys.Bindgen.Log
- SDL3.Sys.Bindgen.Main
- SDL3.Sys.Bindgen.Messagebox
- SDL3.Sys.Bindgen.Metal
- Misc
- SDL3.Sys.Bindgen.Mouse
- SDL3.Sys.Bindgen.Mutex
- SDL3.Sys.Bindgen.Pen
- SDL3.Sys.Bindgen.Pixels
- Platform
- SDL3.Sys.Bindgen.PlatformDefines
- SDL3.Sys.Bindgen.Power
- SDL3.Sys.Bindgen.Process
- SDL3.Sys.Bindgen.Properties
- SDL3.Sys.Bindgen.Rect
- SDL3.Sys.Bindgen.Render
- 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.Stdinc
- SDL3.Sys.Bindgen.Storage
- SDL3.Sys.Bindgen.Surface
- SDL3.Sys.Bindgen.System
- SDL3.Sys.Bindgen.Thread
- SDL3.Sys.Bindgen.Time
- SDL3.Sys.Bindgen.Timer
- SDL3.Sys.Bindgen.Touch
- SDL3.Sys.Bindgen.Tray
- SDL3.Sys.Bindgen.Version
- SDL3.Sys.Bindgen.Video
- SDL3.Sys.Bindgen.Vulkan
- 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
- SDL3.Sys
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| abi-assertions | Verify the baked ABI layout against the system SDL3 headers at build time via generated C static assertions (disable only to diagnose) | Enabled |
| optimize | Build with -O2. Package ghc-options win over cabal's optimization setting, so use -f -optimize for faster iterative builds of this large package. | Enabled |
| optimize-aggressively | 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. | Disabled |
| strict | 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. | Disabled |
| strict-data | 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. | Enabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- sdl3-bindgen-sys-0.0.0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.0.0.1, 0.0.0.2 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.17 && <4.23), bytestring (>=0.11 && <0.13), containers (>=0.6 && <0.9), fin (>=0.3.2 && <0.4), primitive (>=0.9 && <0.10), record-hasfield (>=1.0 && <2), sdl3-bindgen-sys, some (>=1.0.6 && <1.1), template-haskell (>=2.18 && <2.25), vec (>=0.5 && <0.6), vector (>=0.13 && <0.14) [details] |
| Tested with | ghc >=9.8 && <9.9 || >=9.10 && <9.11 || >=9.12 && <9.13 |
| License | BSD-3-Clause[multiple license files] |
| Copyright | (c) 2026 Jeremy Nuttall |
| Author | Jeremy Nuttall |
| Maintainer | jeremy@jeremy-nuttall.com |
| Uploaded | by jtnuttall at 2026-07-27T04:54:33Z |
| Category | Graphics |
| Home page | https://github.com/jtnuttall/lithon#readme |
| Bug tracker | https://github.com/jtnuttall/lithon/issues |
| Source repo | head: git clone https://github.com/jtnuttall/lithon(sdl3-bindgen-sys) |
| Distributions | |
| Downloads | 3 total (3 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |