This is a homework activity for the web development laboratory. Is just a simple example. This tutorial was based on Compiling a New C/C++ Module to WebAssembly.
If changes are made, you can create a new .js and .wasm files with this command:
emcc test.cpp -s WASM=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_RUNTIME_METHODS=['ccall']"
go run main.go