-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The existing (vanilla) Go Plugin system is limited by the following factors, so we want to use gRPC-based (hashicorp/go-plugin) for our module system.
-
Difficult to insert modules due to runtime details changes
Module insertion often fails due to simple runtime changes (adding a logging function, etc..). -
Vulnerable to security (compared to RPC calls in an isolated environment)
The gVisor+gRPC structure allows third-party modules to be safely loaded and executed in an isolated module execution environment. On the other hand, it is difficult to achieve in the general Go Plugin system. -
Cross-compilation issues from Go plugins
For example, to build a module (plugin) in linux/arm64 on a linux/amd64 environment, need to use CGO, which requires the use of an additional toolchain (such as an ARM cross-compiler like gnueabi). This causes a significant degradation of the developer experience.
With this big of a change, it's not possible to guarantee compatibility for previously written modules, so it looks like we're going to have to go the route of adding a bunch of features at the same time as we bump it up to v2.