{"id":24698750,"url":"https://github.com/jupiterrider/purego-sdl3","last_synced_at":"2025-10-10T15:40:40.269Z","repository":{"id":274218732,"uuid":"922246929","full_name":"JupiterRider/purego-sdl3","owner":"JupiterRider","description":"A cgo-free SDL3 binding.","archived":false,"fork":false,"pushed_at":"2025-10-05T10:52:56.000Z","size":1603,"stargazers_count":106,"open_issues_count":1,"forks_count":12,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-10-05T12:26:33.811Z","etag":null,"topics":["binding","freebsd","game-development","go","golang","linux","macos","sdl3","windows"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JupiterRider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT.txt","agents":null,"dco":null,"cla":null}},"created_at":"2025-01-25T17:49:18.000Z","updated_at":"2025-10-05T10:53:00.000Z","dependencies_parsed_at":"2025-02-08T20:24:17.025Z","dependency_job_id":"e251e973-33bf-40be-8520-03feadb08687","html_url":"https://github.com/JupiterRider/purego-sdl3","commit_stats":null,"previous_names":["jupiterrider/purego-sdl3"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JupiterRider/purego-sdl3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterRider%2Fpurego-sdl3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterRider%2Fpurego-sdl3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterRider%2Fpurego-sdl3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterRider%2Fpurego-sdl3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JupiterRider","download_url":"https://codeload.github.com/JupiterRider/purego-sdl3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JupiterRider%2Fpurego-sdl3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004571,"owners_count":26083736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binding","freebsd","game-development","go","golang","linux","macos","sdl3","windows"],"created_at":"2025-01-27T04:29:57.033Z","updated_at":"2025-10-10T15:40:40.235Z","avatar_url":"https://github.com/JupiterRider.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purego-sdl3\n[![Go Reference](https://pkg.go.dev/badge/github.com/jupiterrider/purego-sdl3.svg)](https://pkg.go.dev/github.com/jupiterrider/purego-sdl3)\n\nA cgo-free SDL3 binding.\n\n## About\nThis library doesn't require cgo. It uses [dynamic loading](https://en.wikipedia.org/wiki/Dynamic_loading) with the help of [purego](https://github.com/ebitengine/purego).\n\n## Status\nThis project is in an early stage and not all functions/types are implemented yet. But the ones you see are usable and stable.\n\n## Requirements\nYou need to have SDL3 (at least version 3.2.0) installed as shared library. That means at runtime, it is trying to load SDL:\n- macOS: `libSDL3.dylib`\n- Linux and FreeBSD: `libSDL3.so.0`\n- Windows: `SDL3.dll`\n\nOnly the above-mentioned operating systems with AMD64 or ARM64 architecture are supported.\n\n## Example\nThis simple example just opens a resizable window with a blue background:\n\n```golang\npackage main\n\nimport \"github.com/jupiterrider/purego-sdl3/sdl\"\n\nfunc main() {\n\tif !sdl.SetHint(sdl.HintRenderVSync, \"1\") {\n\t\tpanic(sdl.GetError())\n\t}\n\n\tdefer sdl.Quit()\n\tif !sdl.Init(sdl.InitVideo) {\n\t\tpanic(sdl.GetError())\n\t}\n\n\tvar window *sdl.Window\n\tvar renderer *sdl.Renderer\n\tif !sdl.CreateWindowAndRenderer(\"Hello, World!\", 1280, 720, sdl.WindowResizable, \u0026window, \u0026renderer) {\n\t\tpanic(sdl.GetError())\n\t}\n\tdefer sdl.DestroyRenderer(renderer)\n\tdefer sdl.DestroyWindow(window)\n\n\tsdl.SetRenderDrawColor(renderer, 100, 150, 200, 255)\n\nOuter:\n\tfor {\n\t\tvar event sdl.Event\n\t\tfor sdl.PollEvent(\u0026event) {\n\t\t\tswitch event.Type() {\n\t\t\tcase sdl.EventQuit:\n\t\t\t\tbreak Outer\n\t\t\tcase sdl.EventKeyDown:\n\t\t\t\tif event.Key().Scancode == sdl.ScancodeEscape {\n\t\t\t\t\tbreak Outer\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsdl.RenderClear(renderer)\n\t\tsdl.RenderPresent(renderer)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupiterrider%2Fpurego-sdl3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjupiterrider%2Fpurego-sdl3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupiterrider%2Fpurego-sdl3/lists"}