I was working on an Elixir project recently and one particular open source package that I wanted to make use of was written in Go. I searched for different ways to interface with Go code from Elixir. I know that it is fairly trivial to interface Rust code from Elixir using a NIF but there isn't anything similar for Go that I came across. Most of my research led me towards using Ports and I was about to give in before realizing that WASI (WebAssembly System Interface) is also an option. I had been hearing about Web Assembly for a while now and this was as good of a moment as any to give it a try. I also came across Wasmex which seemed like a good option to run WASI binaries in Elixir. Philipp Tessenow (creator of wasmex) was instrumental in getting this whole thing to work and guiding me to the final working solution, so thanks tessi!

continue reading on yasoob.me

⚠️ This post links to an external website. ⚠️