# veandco/go-sdl2

SDL2 binding for Go

Repository: https://github.com/veandco/go-sdl2
Canonical: https://ross.abutalabs.com/products/go-sdl2
Homepage: https://godoc.org/github.com/veandco/go-sdl2
Language: C
License: BSD-3-Clause
License Family: permissive
Topics: go, binding, sdl2, maintainer-wanted
Last push: 2025-02-20T04:55:37+00:00

## Health v2 (maintenance only)
Score: 26/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 7, release rhythm 8, longevity 100
- inputs: {"age_days": 4837, "days_push": 559, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2326, forks 231 (observed 2026-08-28T04:06:37.426138+00:00)

## What it is
Go bindings (via cgo) for the SDL2 multimedia library, including optional SDL2_image, mixer, ttf, and gfx. It lets Go programs create windows, render graphics, handle input events, and play audio.

## Use cases
- write a 2d game in go
- create a window and handle keyboard input in go
- play sounds and music in a go application
- render images and text with sdl2 from go
- build a cross-platform multimedia app in go

## When to choose
- you want to use SDL2 from Go with mature, widely used bindings
- you need low-level access to windows, rendering, audio, and input
- you are comfortable installing native SDL2 development libraries

## When to avoid
- you want SDL3 support - use purego-sdl3 instead
- you need a high-level game engine rather than raw SDL bindings
- you want to avoid cgo or need easy cross-compilation

## Facets
- artifact type: library
- maturity: maintenance
- function: graphics, game-engine, audio-processing, image-processing
- domain: graphics, cross-platform
- platform: go, windows, cross-platform
- tags: sdl2, cgo-bindings, multimedia, game-development, maintainer-wanted, linux, macos

## Member repositories
- veandco/go-sdl2 (main) score 26

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:37.426138+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:38:16.034504+00:00, confidence not recorded.
  - readme: https://github.com/veandco/go-sdl2 (fetched 2026-08-28T04:06:37.426138+00:00, sha 19e12acb72d9)
  - homepage: https://godoc.org/github.com/veandco/go-sdl2 (fetched 2026-08-29T10:18:43.356502+00:00, sha 4bcc22c445fa)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T10:18:43.368320+00:00, sha 757852027879)
  - site_page: https://pkg.go.dev/github.com/veandco/go-sdl2 (fetched 2026-08-29T10:18:43.366067+00:00, sha 5f6241f0c3cc)
  - site_page: https://go.dev/project (fetched 2026-08-29T10:18:43.370328+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
