Posts

Showing posts from July, 2021

Simple Calculator App Using WebAssembly and go

This tutorial describes how to use WebAssembly and the Go programming language ("golang") to create a simple calculator web page.  It assumes you're on a Mac. It was written in July 2021 and reflects the technical environment of that date. The world doesn't really need another calculator app. I needed to code a demo app using WebAssembly in order to learn WebAssembly. For starters, nobody codes in WebAssembly. They would code in C, C++, Java, or some other high-level language and compile that to WebAssembly, instead of to machine language.  You can think of WebAssembly as a high-performance extension to JavaScript.  If you have some JavaScript functionality which doesn't perform well, you might rewrite it into a language that supports WebAssembly, in order to get better performance. This tutorial is loosely based on [this out-of-date tutorial](https://tutorialedge.net/golang/go-webassembly-tutorial/) but the go language support for WebAssembly has changed since th...