Extend Your Golang App With Embedded WebAssembly Functions in WasmEdge

The Go programming language (Golang) is an easy-to-use and secure programming language that compiles into high-performance native applications. It is a very popular choice for writing software infrastructure and frameworks.

A key requirement for software frameworks is the ability for users to extend and customize it with their own code. However, in Golang, adding user-defined functions or extensions to an existing app is not easy. Oftentimes, you need to integrate at the source code level by combining the source code for the framework and the user-defined functions. While it is possible to create dynamic shared modules with Golang, support for shared modules is lacking on ARM-based systems, which are widely used in edge computing. Furthermore, neither source code integration nor dynamic modules provide isolation for the user-defined functions. The extension could interfere with the framework itself, and it is unsafe to integrate user-defined functions from several parties. As the language for "cloud-native", Golang needs a better extension mechanism.