https://github.com/miqueas/lua-c-api-examples
Some C code I wrote while learning the Lua C API
https://github.com/miqueas/lua-c-api-examples
api c lua lua51 lua52 lua53
Last synced: 5 months ago
JSON representation
Some C code I wrote while learning the Lua C API
- Host: GitHub
- URL: https://github.com/miqueas/lua-c-api-examples
- Owner: Miqueas
- Created: 2021-09-19T16:57:44.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-29T03:52:08.000Z (over 1 year ago)
- Last Synced: 2024-04-29T06:54:42.907Z (over 1 year ago)
- Topics: api, c, lua, lua51, lua52, lua53
- Language: C
- Homepage:
- Size: 38.1 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lua-C-API
A personal repo where I push things while I'm learning the Lua C API! Feel free to contribute :)
> **NOTE**: I really think that the Lua C API and this examples can be highly self-explained, BUT I recommend you to always check the Reference Manual to see in detail how every thing works
## Building
If you want to build this, you'll need Meson and Lua 5.1 development files and then:
```
meson . _BUILD
ninja -C _BUILD
```
And in the `_BUILD` folder you'll see the compiled files
## Running tests
Just:
```
meson test -C _BUILD
```
## References
I mainly readed the [Official Reference Manual][LuaManual] but I also saw this:
* [Veinin/lua-c-api-tutorial][lua-c-api-tutorial] – _First steps_
* [Stack (Wikipedia)][StackWikipedia] – _The simple illustration with numbers was really helpful_
* [Understanding the lua stack][UnderstandingStack] – _A set of articles I found about the stack_
* [tylerneylon/lua_api_demo][api_demo_repo] – _Here I learned how to use the `lua_newuserdata` function_
* [hertogp/lua-capi-examples][lua-capi-examples] – _Stack dump example_
And finally, thanks to the members of the [Telegram Group][TelegramGroup]!
## Why Lua 5.1?
Yes :heavy_check_mark:
[StackWikipedia]: https://en.wikipedia.org/wiki/Stack_(abstract_data_type)
[UnderstandingStack]: https://szpg1108.wordpress.com/2013/08/07/understanding-the-lua-stack-pt-1-the-basics/
[LuaManual]: https://www.lua.org/manual/5.1/manual.html#3
[api_demo_repo]: https://github.com/tylerneylon/lua_api_demo
[lua-c-api-tutorial]: https://github.com/Veinin/lua-c-api-tutorials
[lua-capi-examples]: https://github.com/hertogp/lua-capi-examples
[TelegramGroup]: https://t.me/LuaLang