For highly-specific filtering, you might also find
https://github.com/google/cel-go interesting. CEL is statically typed
and declarative.

On Sat, Oct 28, 2023 at 11:48 PM Mike Schinkel <m...@newclarity.net> wrote:
>
> I recently started using github.com/yuin/gopher-lua for a project to allow 
> users to add filtering criteria that would be highly-specific to a user, but 
> I would never consider using it for implementing a general-purpose plugin.
>
> Using Lua to develop plugins in Go would be ideal IMO. It is not performant 
> like Go, not type-safe like Go, debugging embedded Lua code is difficult 
> compared to working with Delve and Go, and you will have to ship plugin 
> source code, or embed and write to a possibly hidden directory.
>
> For real-world plugins I'd say stick with Hashicorp's go-plugin or similar as 
> others have recommended, and then only fall back to Lua when you want to 
> allow end-users who are not Go developers to extend your app in small ways.  
> #jmtcw #fwiw
>
> -Mike
> P.S. You could also use JavaScript instead of Lua, and most people are likely 
> more familiar with that. I chose not to use a JavaScript package as I wanted 
> something significantly lighter weight than JS.  OTOH, I am seriously 
> considering switching out Lua and moving to github.com/antonmedv/expr for my 
> use-case as it is even lighter weight still.
>
> On Saturday, October 28, 2023 at 8:50:54 AM UTC-4 alex-coder wrote:
>>
>> Hi all.
>>
>> Of course, in case if anyone is in interest to write  plugins for Go.
>> I found another option for writing plugins by use Lua.
>> I haven't touched the example yet, but I'm giving out the link.
>> https://github.com/yuin/gopher-lua/
>>
>> Thank you.
>>
>> четверг, 3 августа 2023 г. в 15:47:26 UTC+3, alex-coder:
>>>
>>> Hi All,
>>> Currently I walk through the next book about native go development and find 
>>> out that it is possible to use the plugin,
>>> but with limitations, so it became interesting what alternatives there are.
>>>
>>> Thank you.
>>>
>>> четверг, 3 августа 2023 г. в 12:09:21 UTC+3, Christoph Berger:
>>>>
>>>> WebAssembly comes to mind - see, for example, https://wazero.io/
>>>>
>>>> A plugin would then be a .wasm binary that can be compiled in any language 
>>>> that supports WebAssembly as target.
>>>>
>>>> Disclaimer: I have not yet tried this approach.
>>>>
>>>> On Wednesday, August 2, 2023 at 12:14:15 PM UTC+2 alex-coder wrote:
>>>>
>>>> Hi All !
>>>> Plug-in package is very interesting, but in case the development under 
>>>> windows it does not work,
>>>> So, any hint to use some option instead will be highly appreciated.
>>>>
>>>> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/71ab878f-2ce6-4c73-9e85-e9d29e61d718n%40googlegroups.com.



-- 
Best regards,
Boris Nagaev

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAFC_Vt5UUD7D8S_k6rAUtf00wFObmqiy4T0jAJHDJOrjoTV9WA%40mail.gmail.com.

Reply via email to