A port of Terraria to the browser using WebAssembly and fna-wasm-threads
Read the writeup for more information on how this works.

Go to the releases page and download the latest release. Extract the contents of terraria-wasm-build.zip to your web server. Cross site isolation headers are required for this to work, so make sure your web server is configured to send the following headers:
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
- A x86_64 Linux system
- dotnet 9.0.4
- the mono-devel package on your distro
- node and pnpm
- Terraria (Linux or Windows build)
- ilspycmd (SPECIFICALLY VERSION 9.0.0.7889) it's recommended to install ilspycmd using the .NET CLI
dotnet tool install --global ilspycmd --version 9.0.0.7889- Clone the repository (make sure you use --recursive!!)
- Decompile Terraria
bash tools/decompile.sh ~/.local/share/Steam/steamapps/common/Terraria/Terraria.exe- Patch Terraria
bash tools/copydecompiled.sh
bash tools/applypatches.sh Vanilla- Build the project
make serveTo build the frontend for production, run:
make publishRight now performance is not good enough in dotnet interpreted/jiterpreter mode, which is required for the MonoMod WASM port to function. Eventually it might be possible with improvements to the dotnet wasm jit or a "mixed aot" mode allowing for better FNA performance, but for now it isn't feasible