Skip to content

HVukman/Lua-in-Odin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adapted from: https://lucasklassmann.com/blog/2019-02-02-embedding-lua-in-c/

Just run: odin run .

Shows:

  • Starting a Lua state
  • Defining variables for Lua
  • Doing Lua Strings in Odin
  • Loading scripts
  • Creating functions in Odin for Lua
  • Creating a namespace in Odin for Lua and adding functions
  • Calling Lua functions from Odin with and without return
  • Getting errors from Lua

Don't forget the lua files.

Update 08-05-2025: Removed the dynamic allocations, since they are not needed. Added tests. Trying to do metatables, but the fields of the tables are not recognized.

About

Embedding Lua in Odin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published