version0.7.10
This commit is contained in:
parent
4d4b3b1c04
commit
36818817bd
14 changed files with 1011 additions and 0 deletions
15
examples/luaex.nim
Normal file
15
examples/luaex.nim
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Embedds Lua into a Nimrod application
|
||||
|
||||
import
|
||||
lua, lualib, lauxlib
|
||||
|
||||
const
|
||||
code = """
|
||||
print 'hi'
|
||||
"""
|
||||
|
||||
var L = luaL_newstate()
|
||||
luaL_openlibs(L)
|
||||
discard luaL_loadbuffer(L, code, code.len, "line")
|
||||
discard lua_pcall(L, 0, 0, 0)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue