Golang

Use WASM Compiled Golang Functions in NextJs

Use WASM Compiled Golang Functions in NextJs

What if you are using Next.js for your website but want to make use of Golang functionality written to support your backend APIs? This is a quick look at the Tinygo WebAssembly guide and how I integrated the output with NextJs.

The Tinygo Guide

Here is the Tinygo guide I used. It gives you a very basic first step to building a wasm binary from Go. Getting Golang set up correctly on my system was the hardest part for me, but even that didn’t take too long.

What Language Should I use for WASM

What Language Should I use for WASM

There is no doubt in my mind that WASM will become a large part of my future toolkit. The performance benefits for serverless functions will directly equate to cost savings. Then the performance benefits for user interfaces will directly equate to increased revenue.

The problem is, there are a few languages to choose from when programming for a WASM environment. I won’t be able to stay proficient in many so do I choose to invest my time in C++, Rust, Go or even F#?