{"id":16866371,"url":"https://github.com/jprjr/lua-demo-module","last_synced_at":"2025-03-18T17:43:23.236Z","repository":{"id":70966714,"uuid":"80765959","full_name":"jprjr/lua-demo-module","owner":"jprjr","description":"A dummy C module that works with FFI and the traditional C api","archived":false,"fork":false,"pushed_at":"2017-02-02T21:18:45.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T21:13:46.685Z","etag":null,"topics":["lua","lua-module","luajit","luajit-ffi"],"latest_commit_sha":null,"homepage":null,"language":"Lua","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/jprjr.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}},"created_at":"2017-02-02T20:32:01.000Z","updated_at":"2018-08-21T20:11:39.000Z","dependencies_parsed_at":"2023-04-13T01:48:54.866Z","dependency_job_id":null,"html_url":"https://github.com/jprjr/lua-demo-module","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/jprjr%2Flua-demo-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprjr%2Flua-demo-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprjr%2Flua-demo-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jprjr%2Flua-demo-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jprjr","download_url":"https://codeload.github.com/jprjr/lua-demo-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244272545,"owners_count":20426755,"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":["lua","lua-module","luajit","luajit-ffi"],"created_at":"2024-10-13T14:50:22.729Z","updated_at":"2025-03-18T17:43:23.216Z","avatar_url":"https://github.com/jprjr.png","language":"Lua","readme":"# lua-demo-module\n\nThis is just a silly example lua module written in C, I used this to\nfigure out how to create a C module that works in Lua and LuaJIT,\nas well as with Lua/LuaJIT embedded into a C program.\n\nYou'll get slightly different output when using LuaJIT vs Lua, to show\nwhether you're using the traditional C API or the FFI API.\n\nFiles:\n\n* demo.c - the module, compiles to 'demo/core.so' and 'demo/core.a'\n* demo.lua - the loader, it will load 'demo/core.so'\n* main.lua - a silly app that just uses the module\n\nSome examples to try out:\n\n```bash\nmake # builds demo/core.so and demo/core.a\nlua main.lua\nluajit main.lua\nluastatic main.lua demo.lua /path/to/liblua.a demo/core.a -I/path/to/lua/include ; ./main\nluastatic main.lua demo.lua /path/to/libluajit.a demo/core.a -I/path/to/luajit/include ; ./main\n```\n\n\n## LICENSE\n\nThis is in the public domain.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjprjr%2Flua-demo-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjprjr%2Flua-demo-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjprjr%2Flua-demo-module/lists"}