ryouzhang / go-lua Goto Github PK
View Code? Open in Web Editor NEWembed lua script language for go, very fast, support coroutine
License: MIT License
embed lua script language for go, very fast, support coroutine
License: MIT License
Hi, can you supply scripts to build this repo?
Ryou, 请问如何通过golua将字符串编译为字节码?
我测试了golua加载luajit编译的字节码,无法运行,请问如何加载字节码?
Hi, thanks for cool libary!
I want to pass pointer of Go struct value to Lua function, then access struct fields using LuaJIT ffi api https://luajit.org/ext_ffi_api.html.
Can you please give an example how to do it? Your demo code already show struct pointers can be passed in and out of lua function and sync_extern_method, but doesn't have example how to access struct fields from Lua side.
Ultimately, I'd like to combine your library with https://scene-si.org/2017/03/13/calling-go-functions-from-lua/, but using Go as host language rather than cgo shared libary (your sync_extern_method seems much simpler to use).
Thanks!
Such as:
a.lua:
man={}
function man.eat()
{
print("eat")
}
Then I want use man.eat in Go,what should I do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.