diff options
| author | Steven <burnett@posteo.de> | 2026-01-17 21:22:52 +0000 |
|---|---|---|
| committer | Steven <burnett@posteo.de> | 2026-01-17 21:22:52 +0000 |
| commit | 68d493c5f261a99b40d90e2cc4f08b24d1975234 (patch) | |
| tree | e9a0e4438d1b7c8e5bb5e26ec2585918e85f8e80 /examples/scripting/lua/README.md | |
| parent | 7ac5be7ba8f700f69009c5e980ee7b12b0653586 (diff) | |
chore(examples): New example for LUA bindings
Diffstat (limited to 'examples/scripting/lua/README.md')
| -rw-r--r-- | examples/scripting/lua/README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/examples/scripting/lua/README.md b/examples/scripting/lua/README.md new file mode 100644 index 0000000..dea8fa2 --- /dev/null +++ b/examples/scripting/lua/README.md @@ -0,0 +1,46 @@ +# Lua Scripting with Zen-C + +This examples demonstrates how to build your Zen-C application with Lua C bindings,<br> +and how you can call Lua code from Zen-C (.zc) context, or exposed Zen-C functions from Lua (.lua) context. + +> Lua is a powerful, efficient, lightweight, embeddable scripting language, often used in games. + +--- + +Example output: + + + +## Setup + +Get Lua 5.4 headers and lib: + +```sh +./deps.sh +``` + +This will leave the headers (.h) and lib (.a) inside a folder called ``lua``. + +## Build + +```sh +zc build lua.zc -o lua +``` + +## Run + +Either + +```sh +zc run lua.zc +``` + +or (after compilation) + +```sh +./lua +``` + +## Documentation + +- https://www.lua.org/manual/5.4/manual.html |
