Add a plugin system to your Go application so third-party developers can extend it without touching your core code.
Write plugins in languages other than Go by using the gRPC communication layer for cross-language support.
Isolate plugin crashes from your main application by running each plugin as a completely separate process.
Add TLS encryption and checksum verification to ensure only trusted plugin binaries are loaded by your app.
| hashicorp/go-plugin | nilsherzig/llocalsearch | foxcpp/maddy | |
|---|---|---|---|
| Stars | 5,953 | 5,955 | 5,960 |
| Language | Go | Go | Go |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 3/5 | 3/5 | 4/5 |
| Audience | developer | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires implementing a Go interface for the behavior to expose and understanding RPC basics, cross-language plugins need additional gRPC setup.
go-plugin is a library from HashiCorp that lets you build plugin systems in the Go programming language. A plugin system means your application can load and run additional pieces of code (plugins) that were written separately, possibly by other developers. This library handles the communication between the main application and each plugin. The way it works is that each plugin runs as a separate process on the same machine, and the main application talks to it over a local network connection using a protocol called RPC. Because the plugin is a separate process, a crash inside a plugin cannot take down the main application. From the perspective of the developer writing the plugin or using it, the experience looks like calling a normal function on a Go interface, and the library handles all the behind-the-scenes communication. Plugins can also be written in other languages, since the library supports a communication format called gRPC which is language-independent. HashiCorp uses this library across several of their well-known open-source tools including Terraform, Vault, Nomad, and Packer. The README states it has run on millions of machines and is considered production-ready. Features described in the README include: automatic forwarding of log output from plugins back to the host application, TLS encryption for communication with plugins, support for checking that a plugin binary matches an expected checksum, the ability to upgrade the host application while a plugin keeps running, and compatibility with terminals that require direct input (TTY). Protocol versioning is also supported so that incompatible plugin versions produce a clear error message rather than silent failures. Using the library requires implementing a Go interface for the behavior you want to expose to plugins, then wrapping it with the client and server code that go-plugin needs to route calls over RPC.
go-plugin is HashiCorp's library for building plugin systems in Go, where each plugin runs as a separate process and communicates via RPC or gRPC. A crash in a plugin cannot take down the main app, used in production by Terraform, Vault, Nomad, and Packer.
Mainly Go. The stack also includes Go, gRPC, RPC.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.