What's your definition of a plugin? =D
Yeah, should have been more precise. Code that can be loaded at runtime, does not need to be compiled together with the host application, can be loaded by just providing a path to a file/directory and can be executed in the host, ideally securely (not a strict requirement for my usage). The plugin ideally runs with performance very close to host performance
go plugin package gets close, but the compile part is completely broken, where in reality the plugin has dependencies that can collide with the host. It would be fine if it was just the go runtime requirement that must match, but in reality it forces usage of cgo and a set of problems that make it really hard to use.
Have you looked at https://github.com/hashicorp/go-plugin?