mirror of https://github.com/Hilbis/Hilbish
docs: make some minor fixes for module interface description
parent
dcbb65a611
commit
42446fbf57
|
@ -12,13 +12,15 @@ menu:
|
||||||
to load Hilbish plugins/modules.
|
to load Hilbish plugins/modules.
|
||||||
Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin)
|
Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin)
|
||||||
that are used to add functionality to Hilbish that cannot be written
|
that are used to add functionality to Hilbish that cannot be written
|
||||||
n Lua for any reason.
|
in Lua for any reason.
|
||||||
|
|
||||||
To make a valid native module, the Go plugin
|
To make a valid native module, the Go plugin
|
||||||
has to export a Loader function with a signature like so:
|
has to export a Loader function with a signature like so:
|
||||||
`func(*rt.Runtime) rt.Value`
|
`func(*rt.Runtime) rt.Value`.
|
||||||
|
|
||||||
`rt` in this case refers to the Runtime type at
|
`rt` in this case refers to the Runtime type at
|
||||||
https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime
|
https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime
|
||||||
|
|
||||||
Hilbish uses this package as its Lua runtime. You will need to read
|
Hilbish uses this package as its Lua runtime. You will need to read
|
||||||
it to use it for a native plugin.
|
it to use it for a native plugin.
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,15 @@ import (
|
||||||
to load Hilbish plugins/modules.
|
to load Hilbish plugins/modules.
|
||||||
Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin)
|
Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin)
|
||||||
that are used to add functionality to Hilbish that cannot be written
|
that are used to add functionality to Hilbish that cannot be written
|
||||||
n Lua for any reason.
|
in Lua for any reason.
|
||||||
|
|
||||||
To make a valid native module, the Go plugin
|
To make a valid native module, the Go plugin
|
||||||
has to export a Loader function with a signature like so:
|
has to export a Loader function with a signature like so:
|
||||||
`func(*rt.Runtime) rt.Value`
|
`func(*rt.Runtime) rt.Value`.
|
||||||
|
|
||||||
`rt` in this case refers to the Runtime type at
|
`rt` in this case refers to the Runtime type at
|
||||||
https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime
|
https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime
|
||||||
|
|
||||||
Hilbish uses this package as its Lua runtime. You will need to read
|
Hilbish uses this package as its Lua runtime. You will need to read
|
||||||
it to use it for a native plugin.
|
it to use it for a native plugin.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue