mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-01 16:52:03 +00:00
this is the only way i could think of to be able to push go functions to lua on the clua side. this may or may not need adjustments on golua side though...
10 lines
223 B
Go
10 lines
223 B
Go
//go:build midnight
|
|
|
|
package moonlight
|
|
|
|
func (mlr *Runtime) SetExports(tbl *Table, exports map[string]Export) {
|
|
for name, export := range exports {
|
|
tbl.SetField(name, FunctionValue(mlr.GoFunction(export.Function)))
|
|
}
|
|
}
|