TinyGo is very useful for compiling programs both for use in browsers (WASM) as well as for use on servers and other edge devices (WASI).

Using WASI

How to use TinyGo with the WebAssembly System Interface (WASI).

Using WASM

How to call WebAssembly from JavaScript in a browser.

Additional Resources

Additional Resources for using TinyGo with WASM/WASI