{"id":22510998,"url":"https://github.com/dinau/sdl3_nim","last_synced_at":"2026-04-20T10:32:21.343Z","repository":{"id":264315982,"uuid":"892957062","full_name":"dinau/sdl3_nim","owner":"dinau","description":"SDL3 wrapper for Nim language","archived":false,"fork":false,"pushed_at":"2026-03-31T11:41:30.000Z","size":67441,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-31T13:31:30.531Z","etag":null,"topics":["futhark","imgui","nim","opengl","sdl-ttf","sdl3","sdl3-ttf","stb-image","ttf","vulkan"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dinau.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":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-23T06:24:13.000Z","updated_at":"2026-03-31T11:41:35.000Z","dependencies_parsed_at":"2024-11-23T11:26:28.094Z","dependency_job_id":"de2f31da-c776-4629-af27-a454d427abe4","html_url":"https://github.com/dinau/sdl3_nim","commit_stats":null,"previous_names":["dinau/sdl3_nim"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/dinau/sdl3_nim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fsdl3_nim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fsdl3_nim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fsdl3_nim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fsdl3_nim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dinau","download_url":"https://codeload.github.com/dinau/sdl3_nim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dinau%2Fsdl3_nim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32043015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["futhark","imgui","nim","opengl","sdl-ttf","sdl3","sdl3-ttf","stb-image","ttf","vulkan"],"created_at":"2024-12-07T02:07:42.753Z","updated_at":"2026-04-20T10:32:21.336Z","avatar_url":"https://github.com/dinau.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [sdl3_nim](#sdl3_nim)\n  - [Install](#install)\n  - [For Linux OS](#for-linux-os)\n  - [For Windows11](#for-windows11)\n  - [Build and run examples](#build-and-run-examples)\n  - [About auto renaming](#about-auto-renaming)\n  - [Develeopment](#develeopment)\n  - [My tools version](#my-tools-version)\n  - [Other SDL game tutorial platfromer project](#other-sdl-game-tutorial-platfromer-project)\n  - [Other examples project for Dear ImGui](#other-examples-project-for-dear-imgui)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n### sdl3_nim\n\n---\n\n![alt](https://github.com/dinau/sdl3_nim/actions/workflows/windows.yml/badge.svg) \n![alt](https://github.com/dinau/sdl3_nim/actions/workflows/linux.yml/badge.svg)\n\nSDL3 wrapper for Nim language with [futhark](https://github.com/PMunch/futhark#installation) converter.\n\n- SDL3: 3.4.2 (2026/03)\n- SDL_ttf:  3.2.2\n- Windows OS 11 \n- Linux Debian / Ubuntu families \n- Try [ImGuin SDL3 example](https://github.com/dinau/imguin_examples#sdl3-opengl3--renderer---sdlgpu3---vulkan)\n\n\n#### Install\n\n---\n\nFirst delete old version \n\n```sh\nnimble uninstall sdl3_nim\n```\n\nInstall\n\n```sh\nnimble install sdl3_nim \n```\n\n#### For Linux OS\n\n---\n\n- If the package manager of the OS has SDL3 and SDL_ttf packages, install them with the package manager\n- Otherwise install them from source code as follows (on Debian / Ubuntu families),  \n   1. Download source code from [SDL3](https://github.com/libsdl-org/SDL/archive/refs/tags/release-3.4.2.zip) and [SDL3_ttf](https://github.com/libsdl-org/SDL_ttf/archive/refs/tags/release-3.2.2.zip)\n   1. Install build tool **Ninja**\n\n      ```sh\n      sudo apt install ninja-build\n      ```\n\n   1. Extract SDL3 zip file and \n   \n      ```sh\n      cd SDL-release-3.4.2 \n      mkdir build\n      cd build \n      cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local\n      ninja\n      sudo ninja install\n      sudo ldconfig\n      ```\n\n   1. Extract SDL3_ttf zip file and \n   \n      ```sh\n      cd SDL_ttf-release-3.2.2 \n      mkdir build\n      cd build \n      cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/usr/local\n      ninja\n      sudo ninja install\n      sudo ldconfig\n      ```\n\n#### For Windows11\n\n---\n\nDownload SDL3.dll from [here](https://github.com/libsdl-org/SDL/releases/), extracts SDL3-3.x.xx-win32-x64.zip  \nthen copy SDL3.dll to your application folder.\n\n\n#### Build and run examples\n\n---\n\n```sh\ngit clone https://github.com/dinau/sdl3_nim\n```\n\n```sh\ncd sdl3_nim\nmake \n```\n\nor \n\n```sh\ncd examples/basic\nmake run\n```\n\n[basic.nim](examples/basic/basic.nim)\n\n![alt](https://github.com/dinau/sdl3_nim/blob/main/src/sdl3_nim/private/img/basic-nim-sdl3.gif?raw=true)\n\nor\n\n```sh\ncd examples/platformer\nmake run\n```\n\n[platformer.nim](examples/platformer/platformer.nim)\n\n![alt](https://github.com/dinau/sdl3_nim/blob/main/src/sdl3_nim/private/img/platformer-nim-sdl3.gif?raw=true)\n\nor\n\n```sh\ncd examples/sdlapp_lines\nmake run\n```\n\n[sdlapp_lines.nim](examples/sdlapp_lines/sdlapp_lines.nim)\n\nRefer to https://github.com/libsdl-org/SDL/tree/main/examples/renderer/03-lines\n\n![alt](https://github.com/libsdl-org/SDL/blob/main/examples/renderer/03-lines/thumbnail.png?raw=true)\n\n\nor\n\n```sh\ncd examples/sdlapp\nmake run\n```\n\n[sdlapp.nim](examples/sdlapp/sdlapp.nim)\n\n![alt](https://github.com/dinau/sdl3_nim/blob/main/src/sdl3_nim/private/img/earth4.gif?raw=true)\n\n#### About auto renaming \n\n---\n\nNotice: [Futhark](https://github.com/PMunch/futhark) converter has automatically renamed these symbols.\n\n```nim\nRenaming \"SDLK_MEDIASELECT\" to \"SDLK_MEDIASELECT_const\" [User]\nRenaming \"SDLK_a\" to \"SDLK_a_const\" [User]\nRenaming \"SDLK_b\" to \"SDLK_b_const\" [User]\nRenaming \"SDLK_c\" to \"SDLK_c_const\" [User]\nRenaming \"SDLK_d\" to \"SDLK_d_const\" [User]\nRenaming \"SDLK_e\" to \"SDLK_e_const\" [User]\nRenaming \"SDLK_f\" to \"SDLK_f_const\" [User]\nRenaming \"SDLK_g\" to \"SDLK_g_const\" [User]\nRenaming \"SDLK_h\" to \"SDLK_h_const\" [User]\nRenaming \"SDLK_i\" to \"SDLK_i_const\" [User]\nRenaming \"SDLK_j\" to \"SDLK_j_const\" [User]\nRenaming \"SDLK_k\" to \"SDLK_k_const\" [User]\nRenaming \"SDLK_l\" to \"SDLK_l_const\" [User]\nRenaming \"SDLK_m\" to \"SDLK_m_const\" [User]\nRenaming \"SDLK_n\" to \"SDLK_n_const\" [User]\nRenaming \"SDLK_o\" to \"SDLK_o_const\" [User]\nRenaming \"SDLK_p\" to \"SDLK_p_const\" [User]\nRenaming \"SDLK_q\" to \"SDLK_q_const\" [User]\nRenaming \"SDLK_r\" to \"SDLK_r_const\" [User]\nRenaming \"SDLK_s\" to \"SDLK_s_const\" [User]\nRenaming \"SDLK_t\" to \"SDLK_t_const\" [User]\nRenaming \"SDLK_u\" to \"SDLK_u_const\" [User]\nRenaming \"SDLK_v\" to \"SDLK_v_const\" [User]\nRenaming \"SDLK_w\" to \"SDLK_w_const\" [User]\nRenaming \"SDLK_x\" to \"SDLK_x_const\" [User]\nRenaming \"SDLK_y\" to \"SDLK_y_const\" [User]\nRenaming \"SDLK_z\" to \"SDLK_z_const\" [User]\nRenaming \"SDL_EventAction\" to \"SDL_EventAction_typedef\" [User]\nRenaming \"SDL_GLAttr\" to \"SDL_GLAttr_typedef\" [User]\nRenaming \"SDL_GLContextFlag\" to \"SDL_GLContextFlag_typedef\" [User]\nRenaming \"SDL_GLContextReleaseFlag\" to \"SDL_GLContextReleaseFlag_typedef\" [User]\nRenaming \"SDL_GLProfile\" to \"SDL_GLProfile_typedef\" [User]\nRenaming \"SDL_GL_CONTEXT_RESET_NOTIFICATION\" to \"SDL_GL_CONTEXT_RESET_NOTIFICATION_enumval\" [User]\nRenaming \"SDL_Log\" to \"SDL_Log_proc\" [User]\nRenaming \"SDL_Mutex\" to \"SDL_Mutex_typedef\" [User]\nRenaming \"SDL_PRIX32\" to \"SDL_PRIX32_const\" [User]\nRenaming \"SDL_PRIX64\" to \"SDL_PRIX64_const\" [User]\nRenaming \"SDL_Quit\" to \"SDL_Quit_proc\" [User]\nRenaming \"SDL_SCALEMODE_LINEAR\" to \"SDL_SCALEMODE_LINEAR_enumval\" [User]\nRenaming \"SDL_SCALEMODE_NEAREST\" to \"SDL_SCALEMODE_NEAREST_enumval\" [User]\nRenaming \"SDL_SCANCODE_MEDIA_SELECT\" to \"SDL_SCANCODE_MEDIA_SELECT_enumval\" [User]\nRenaming \"SDL_SensorUpdate\" to \"SDL_SensorUpdate_const\" [User]\nRenaming \"SDL_ThreadID\" to \"SDL_ThreadID_typedef\" [User]\nRenaming \"SDL_UserEvent\" to \"SDL_UserEvent_typedef\" [User]\nRenaming \"SDL_strtok_r\" to \"SDL_strtok_r_proc\" [User]\nRenaming \"block\" to \"block_arg\" [User]\nRenaming \"end\" to \"end_field\" in struct_SDL_HapticRamp [User]\nRenaming \"func\" to \"func_arg\" [User]\nRenaming \"mod\" to \"mod_field\" in struct_SDL_KeyboardEvent [User]\nRenaming \"proc\" to \"proc_arg\" [User]\nRenaming \"ptr\" to \"ptr_arg\" [User]\nRenaming \"type\" to \"type_arg\" [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_AsyncIOOutcome [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_AudioDeviceEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_CameraDeviceEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_ClipboardEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_CommonEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_DisplayEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_DropEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_GPUTextureCreateInfo [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_GamepadAxisEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_GamepadButtonEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_GamepadDeviceEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_GamepadSensorEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_GamepadTouchpadEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticCondition [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticConstant [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticCustom [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticDirection [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticLeftRight [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticPeriodic [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_HapticRamp [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_JoyAxisEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_JoyBallEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_JoyBatteryEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_JoyButtonEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_JoyDeviceEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_JoyHatEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_KeyboardDeviceEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_KeyboardEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_MouseButtonEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_MouseDeviceEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_MouseMotionEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_MouseWheelEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PathInfo [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PenAxisEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PenButtonEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PenMotionEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PenProximityEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PenTouchEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_PinchFingerEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_QuitEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_RenderEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_SensorEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_TextEditingCandidatesEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_TextEditingEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_TextInputEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_TouchFingerEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_UserEvent [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_VirtualJoystickDesc [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_VirtualJoystickSensorDesc [User]\nRenaming \"type\" to \"type_field\" in struct_SDL_WindowEvent [User]\nRenaming \"type\" to \"type_field\" in union_SDL_Event [User]\nRenaming \"type\" to \"type_field\" in union_SDL_HapticEffect [User]\n```\n\n#### Develeopment \n\n---\n\nGenerating SDL3 Nim header files with Futhark.\n\n[The definition file of SDL3](src/sdl3_defs.nim) can be updated by yourself as follows, \n\n1. Replace [src/private/SDL3](src/private/SDL3) with  [latest officail SDL3 library](https://github.com/libsdl-org/SDL/releases)\n1. [Install Futhark](https://github.com/PMunch/futhark#installation)\n1. Generate definition file\n\n   ```sh\n   pwd \n   sdl3_nim\n   make gen\n   ```\n\n   `src/sdl3_defs.nim` updated will be generated.\n\n#### My tools version \n\n---\n\n- Futhark 0.15.0\n- nim-2.2.6\n- Gcc.exe (Rev2, Built by MSYS2 project) 15.2.0\n\n#### Other SDL game tutorial platfromer project\n\n---\n\n![ald](https://github.com/dinau/luajit-platformer/raw/main/img/platformer-luajit-sdl2.gif)\n\n| Language             |          | SDL         | Project                                                                                                                                               |\n| -------------------: | :---:    | :---:       | :----------------------------------------------------------------:                                                                                    |\n| **LuaJIT**           | Script   | SDL2        | [LuaJIT-Platformer](https://github.com/dinau/luajit-platformer)                                                                                       |\n| **Nelua**            | Compiler | SDL2        | [NeLua-Platformer](https://github.com/dinau/nelua-platformer)                                                                                         |\n| **Nim**              | Compiler | SDL3 / SDL2 | [Nim-Platformer-sdl2](https://github.com/def-/nim-platformer)/ [Nim-Platformer-sdl3](https://github.com/dinau/sdl3_nim/tree/main/examples/platformer) |\n| **Ruby**             | Script   | SDL3        | [Ruby-Platformer](https://github.com/dinau/ruby-platformer)                                                                                           |\n| **Zig**              | Compiler | SDL3 / SDL3 | [Zig-Platformer](https://github.com/dinau/zig-platformer)                                                                                             |\n\n\n#### Other examples project for Dear ImGui\n\n---\n\n| Language             |          | Project                                                                                                                                         |\n| -------------------: | :---:    | :----------------------------------------------------------------:                                                                              |\n| **Lua**              | Script   | [LuaJITImGui](https://github.com/dinau/luajitImGui)                                                                                             |\n| **NeLua**            | Compiler | [NeLuaImGui](https://github.com/dinau/neluaImGui) / [NeLuaImGui2](https://github.com/dinau/neluaImGui2)                                         |\n| **Nim**              | Compiler | [ImGuin](https://github.com/dinau/imguin), [Nimgl_test](https://github.com/dinau/nimgl_test), [Nim_implot](https://github.com/dinau/nim_implot) |\n| **Python**           | Script   | [DearPyGui for 32bit WindowsOS Binary](https://github.com/dinau/DearPyGui32/tree/win32)                                                         |\n| **Ruby**             | Script   | [igRuby_Examples](https://github.com/dinau/igruby_examples)                                                                                     |\n| **Zig**, C lang.     | Compiler | [Dear_Bindings_Build](https://github.com/dinau/dear_bindings_build)                                                                             |\n| **Zig**              | Compiler | [ImGuinZ](https://github.com/dinau/imguinz)                                                                                                     |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinau%2Fsdl3_nim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdinau%2Fsdl3_nim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdinau%2Fsdl3_nim/lists"}