{"id":16608114,"url":"https://github.com/ikskuh/sdl.zig-example","last_synced_at":"2025-10-29T16:32:17.501Z","repository":{"id":68601249,"uuid":"324400525","full_name":"ikskuh/SDL.zig-Example","owner":"ikskuh","description":"A small usage example on how to build and use SDL.zig","archived":false,"fork":false,"pushed_at":"2021-02-15T11:51:17.000Z","size":15,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-17T11:43:07.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ikskuh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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},"funding":{"github":"MasterQ32"}},"created_at":"2020-12-25T16:59:10.000Z","updated_at":"2024-05-17T11:43:10.249Z","dependencies_parsed_at":"2023-02-21T09:46:02.885Z","dependency_job_id":null,"html_url":"https://github.com/ikskuh/SDL.zig-Example","commit_stats":null,"previous_names":["ikskuh/sdl.zig-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikskuh%2FSDL.zig-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikskuh%2FSDL.zig-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikskuh%2FSDL.zig-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ikskuh%2FSDL.zig-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ikskuh","download_url":"https://codeload.github.com/ikskuh/SDL.zig-Example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219857436,"owners_count":16556062,"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","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":[],"created_at":"2024-10-12T01:25:08.715Z","updated_at":"2025-10-29T16:32:12.178Z","avatar_url":"https://github.com/ikskuh.png","language":"Zig","funding_links":["https://github.com/sponsors/MasterQ32"],"categories":[],"sub_categories":[],"readme":"# SDL2 with Zig\n\nThis is a simple example project that renders the classic *bouncing DVD logo* with SDL2. This example is a minimal example on how to set up a fully deployable project with Zig.\n\n![Screenshot](https://mq32.de/public/9223d8240a1d75cf9387243a0696efd882aab3b0.png)\n\n## Building\n\nThis example requires **Zig master**, you can obtain a copy for your system [here](https://ziglang.org/download/).\n\n### Prerequisites\nClone this repository with `git` recursively and change into the cloned working directory:\n```\ngit clone https://github.com/MasterQ32/SDL.zig-Example sdl-example --recursive\ncd sdl-example\n```\n\nIf you don't want to use submodules, obtain a copy of [SDL.zig](https://github.com/MasterQ32/SDL.zig) and copy it into `deps/sdl`.\n\n### Linux\nInstall the development packages listed below and invoke `zig build`.\n\n#### Packages (Debian, Ubuntu)\n- `libsdl2-dev`\n- `libsdl2-image-dev`\n\n#### Packages (Arch Linux, Manjaro)\n- `sdl2`\n- `sdl2_image`\n\n### Windows\nWindows has no pre-built SDL2 neither a package manager. This means you have to download the development libraries from [libsdl.org](https://www.libsdl.org/download-2.0.php) for either *Visual C++ 32/64-bit* or *MinGW 32/64-bit* and extract it into a folder.\n\nThe same must be done for the [`SDL_image` development libraries](https://www.libsdl.org/projects/SDL_image/). Chose the same abi/compiler as your SDL2 download above.\n\nThen, use\n```\nzig build -Dsdl-sdk=C:\\Users\\MYUSERNAME\\...\\SDL2-2.X.Y -Dsdl-image-sdk=C:\\Users\\MYUSERNAME\\...\\SDL2_image-2.Z.W\n```\nto build your project. The build script will auto-detect depending on your target if the *Visual C++ 32/64-bit* or *MinGW 32/64-bit* folder layout should be used.\n\n### MacOS\n\nInstall `sdl2` and `sdl2_image` via *brew*:\n```\nbrew install sdl2\nbrew install sdl2_image\n```\n\nthen invoke `zig build`.\n\n### Cross-Build (Host: Linux, Target: Windows)\nJust follow the instructions for building for *Windows*, but use *MinGW 32/64-bit*. Using *Visual C++ 32/64-bit* will **not** work!\n\n### Cross-Build (Host: Windows, Target: Linux)\nNot supported atm. Use WSL for this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikskuh%2Fsdl.zig-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fikskuh%2Fsdl.zig-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fikskuh%2Fsdl.zig-example/lists"}