2024-06-27 18:19:45 +08:00
|
|
|
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()
|
2024-06-30 19:35:45 +08:00
|
|
|
if res := L.DoString(c.Str("print('hello world')")); res != lua.OK {
|
2024-06-27 18:19:45 +08:00
|
|
|
println("error")
|
|
|
|
|
}
|
|
|
|
|
}
|