llgo/c/lua

This commit is contained in:
luoliwoshang
2024-06-27 18:19:45 +08:00
parent af3e326178
commit 7a294e6d4e
11 changed files with 679 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
package main
import (
_ "unsafe"
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/lua"
)
func main() {
L := lua.NewState()
defer L.Close()
L.OpenLibs()
if res := L.Dostring(c.Str("print('hello world')")); res != lua.OK {
println("error")
}
}