Giter Club home page Giter Club logo

go-lua's People

Contributors

ryou-z-20230331 avatar ryouzhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tiger0oo0 fonghou

go-lua's Issues

How to load a lua module?

Such as:
a.lua:
man={}
function man.eat()
{
print("eat")
}

Then I want use man.eat in Go,what should I do?

How to access Go struct as C struct using LuaJIT ffi

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.