{"id":23587920,"url":"https://github.com/arkenidar/ffi-luajit-sdl","last_synced_at":"2025-05-07T10:21:37.318Z","repository":{"id":73709472,"uuid":"565046812","full_name":"arkenidar/ffi-luajit-sdl","owner":"arkenidar","description":"SDL2 * accessed from LuaJIT with the help of its FFI. (*) OpenGL also!","archived":false,"fork":false,"pushed_at":"2024-01-28T12:32:06.000Z","size":8073,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-24T08:53:49.931Z","etag":null,"topics":["2d","3d","ffi","gl","luajit","maze","obj","opengl","stl"],"latest_commit_sha":null,"homepage":"","language":"C","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/arkenidar.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}},"created_at":"2022-11-12T06:55:00.000Z","updated_at":"2024-09-18T02:36:27.000Z","dependencies_parsed_at":"2023-02-28T12:01:08.655Z","dependency_job_id":"252589d2-fdb4-4d09-b065-47a8b51fc7e0","html_url":"https://github.com/arkenidar/ffi-luajit-sdl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fffi-luajit-sdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fffi-luajit-sdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fffi-luajit-sdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arkenidar%2Fffi-luajit-sdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arkenidar","download_url":"https://codeload.github.com/arkenidar/ffi-luajit-sdl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231439085,"owners_count":18376838,"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":["2d","3d","ffi","gl","luajit","maze","obj","opengl","stl"],"created_at":"2024-12-27T05:10:35.983Z","updated_at":"2025-05-07T10:21:37.306Z","avatar_url":"https://github.com/arkenidar.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"For testing and scripting I used Linuxes (Debian, Arch), and MSYS/MINGW in Windows. Looking forward for Android too (WIP).\n\n# requirement to install\nsudo apt install luajit libsdl2-dev # apt in Debian\n\nlaunch with LuaJIT.org for example `luajit maze.lua`\n| script | description |\n|--------|-------------|\n| maze.lua | 2d with input and asset loader |\n| opengl.lua | 3d |\n| app.lua | basic |\n\nhttps://luajit.org/ext_ffi.html The FFI library allows calling external C functions and using C data structures from pure Lua code.\n\n```\nsome credit and further documentation:\n\nUsing SDL from luajit's built-in ffi module\nhttps://gist.github.com/creationix/1213280/a97d7051decb2f1d3e8844186bbff49b6442700a\n-- load the luajit ffi module\nlocal ffi = require \"ffi\"\n-- Parse the C API header\n-- It's generated with:\n--\n--     echo '#include \u003cSDL.h\u003e' \u003e stub.c\n--     gcc -I /usr/include/SDL -E stub.c | grep -v '^#' \u003e ffi_SDL.h\n--\nffi.cdef(io.open('ffi_SDL.h', 'r'):read('*a'))\n-- Load the shared object\nlocal SDL = ffi.load('SDL')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkenidar%2Fffi-luajit-sdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farkenidar%2Fffi-luajit-sdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farkenidar%2Fffi-luajit-sdl/lists"}