From 42446fbf57cc0e3de596ec5f9b4a90677c3f8539 Mon Sep 17 00:00:00 2001 From: sammyette Date: Mon, 10 Jul 2023 22:45:49 -0400 Subject: [PATCH] docs: make some minor fixes for module interface description --- docs/api/hilbish/hilbish.module.md | 6 ++++-- module.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/api/hilbish/hilbish.module.md b/docs/api/hilbish/hilbish.module.md index 5f5348e..2e4d8e1 100644 --- a/docs/api/hilbish/hilbish.module.md +++ b/docs/api/hilbish/hilbish.module.md @@ -12,13 +12,15 @@ menu: to load Hilbish plugins/modules. Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin) 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 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 https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime + Hilbish uses this package as its Lua runtime. You will need to read it to use it for a native plugin. diff --git a/module.go b/module.go index 47053a5..3da87c6 100644 --- a/module.go +++ b/module.go @@ -14,13 +14,15 @@ import ( to load Hilbish plugins/modules. Hilbish modules are Go-written plugins (see https://pkg.go.dev/plugin) 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 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 https://pkg.go.dev/github.com/arnodel/golua@master/runtime#Runtime + Hilbish uses this package as its Lua runtime. You will need to read it to use it for a native plugin. */