I believe Hashicorp's go-plugin was developed long before Go's stdlib plugin functionality was made available.
But they still use it. It's well established and tested, the architecture has security benefits, and it works cross-platform. It also makes it easier for plugins to be distributed by third parties: they don't have to be compiled with the exact same toolchain. In fact, they don't even have to be written in Go. Of course, shared libraries will be much faster - so it depends on your use case, whether you need large volumes of low-latency calls. If your production environment is Linux, and the only issue is around *development* under Windows, then you can look into WSL or virtual machines. On Thursday, 3 August 2023 at 07:17:49 UTC+1 alex-coder wrote: > Hi All, > > so, binary code plugin as a RPC - frankly, never thought about :-) > > What is written in go spec is a > >> dynamically discovering and loading *shared lib* > as I see it but community developed much further > > Thank you. > > среда, 2 августа 2023 г. в 15:03:38 UTC+3, TheDiveO: > >> It really depends on what you want to achieve... >> >> 1. dynamically discovering *out-of-process* RPC plugins ... >> Hashicorp's might be the most famous one. >> 2. dynamically discovering and loading *shared lib *plugins ... this >> needs some plumbing above the pure stdlib plugin functionality. >> Personally, >> I find the shared libs to be finicky and haven't yet done a real project >> that needed this variant (but I wrote a go-plugger >> <https://github.com/thediveo/go-plugger> module as an example). >> 3. statically binary-builtin plugins: this actually is what I tend to >> use in several of my own projects, where there is no need for dynamically >> extending but instead to easily maintain and use a fixed set of "plugins" >> and that set of plugins tends to slowly grow. The plugin mechanism might >> help organizing, such as my own go-plugger >> <https://github.com/thediveo/go-plugger> supporting type-safe plugin >> APIs and ordering and iterating plugins at runtime. For instance, I use >> this mechanism to simplify adding new types to factories, or to >> "decorate" >> containers with additional labels, such as in Docker compose contexts, or >> k8s contexts, or ... >> >> >> 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/c3905d16-f759-42e1-a838-ee667a96e481n%40googlegroups.com.