Skip to content

Instantly share code, notes, and snippets.

@exts
Created December 2, 2019 15:28
Show Gist options
  • Save exts/c1141318af28023a7b8dbb64b776650f to your computer and use it in GitHub Desktop.
Save exts/c1141318af28023a7b8dbb64b776650f to your computer and use it in GitHub Desktop.
godot wasm mono
⛶Today at 2:45 PM
you need emsdk: https://emscripten.org/docs/getting_started/downloads.html
1.38.48 or greater do not seem to work with mono right now. we're using 1.38.47
i've had some issues with fastcomp, so i recommend upstream
example:
# Clone and update esmdk
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
# Install version 1.38.47-upstream
./emsdk install 1.38.47-upstream
# Activate version 1.38.47-upstream. This creates a $HOME/.emscripten file which our build scripts require.
./emsdk activate 1.38.47-upstream
cd ..
# Clone Mono
git clone https://github.com/mono/mono
# Our scripts need this environment variable to find the mono source code
export MONO_SOURCE_ROOT=$PWD/mono
# Clone the build scripts and build the Mono runtime for wasm
git clone https://github.com/godotengine/godot-mono-builds
cd godot-mono-builds
./wasm.py configure --target=runtime
./wasm.py make --target=runtime
# By default, the output path is $HOME/mono-installs/wasm-runtime-release/
then you specify that path when building godot for wasm:
scons p=javascript tools=no target=release_debug module_mono_enabled=yes mono_prefix=$HOME/mono-installs/wasm-runtime-release/
also, you may need to install some packages required for compiling Mono: https://www.mono-project.com/docs/compiling-mono/linux/#debian-based-distributions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment