What does HackerNews think of go-plugin?

Golang plugin system over RPC.

Language: Go

I am looking forward to a mix of both - I am hoping to add a concept called "operator" which would be a go-plugin [1], just like terraform providers, but build backends. So, someone would be able to, say, write a Slack plugin (in Go, or anything over RPC) which sends a message once a build is complete - like Jenkins/GitHub actions, or just scripts that we can reuse like GitLab CI through `modules`.

Perhaps a new registry where we can push custom modules and providers (operators in this case), I'm curious to know about if we have any existing implementations we could reuse for the registry.

[1]: https://github.com/hashicorp/go-plugin

For some reason, the act of choosing a plugin mechanism for our new project has been presented in my head a dilemma. Not a clear winner between the built-in stuff (plugin stdlib), the boring but battle tested option (Hashicorp go-plugin [1]) and the new exciting shiny ("future proof?") object web assembly plugins [2]

I ended up choosing the "traditional" Hashicorp library but any feedback, or comments on why you might think I am making a terrible mistake would be appreciated :)

[1] https://github.com/hashicorp/go-plugin [2] https://github.com/WebAssembly/WASI/blob/snapshot-01/phases/...

I benchmarked some of the most popular go plugin libraries here in addition to the plugin package that comes with go: https://github.com/uberswe/go-plugin-benchmark

Right now I'm leaning towards using https://github.com/hashicorp/go-plugin

You should link your project, it would be interesting to follow.

Does anyone have time to explain the downsides of the HashiCorp plugin approach (gRPC to another process) vs. creating an interpreter?

https://github.com/hashicorp/go-plugin

I agree with this comment from Reddit four days ago:

> The inability to unload a plugin defeats the use I would have for this, unfortunately. A long running service with plugins may want to load new, updated versions of an existing plugin. Not being able to unload the old version, ends up creating stale references which will keep piling up for the lifetime of the process. As I understand it, this is essentially a memory leak. [...]

> https://www.reddit.com/r/golang/comments/53adu8/a/d7rmmco

There is also this project by Hashicorp: https://github.com/hashicorp/go-plugin