

You can use the following commands to check the LLVM versions of the currently installed nightly toolchain and the currently active emcc: rustc +nightly -version -verboseĮmcc -v reports the version number of clang, which is equal to the version number of the overall LLVM release. The compatibility problems between Rust and Emscripten versions are assumed to stem from differing LLVM versions.

Add the following to your workspace's/project's Cargo.toml:ĭisclaimer: Currently, the following steps are only tested and confirmed to work on Linux. As a workaround, you can set opt-level = 1 in debug builds, which reduces the build size.Debug builds may not work due to their large size.

See this issue for more details and instructions for failing experimental build. In particular, Godot export template should be built before the GDNative library.Īlso note that wasm32-unknown-emscripten is a 32-bit target, which can cause problems with crates incorrectly assuming that usize is 64 bits wide. This means that the order in which steps are completed matters. You can check which versions of Emscripten/Rust you are using like this: emcc -vĪ list of compatible Rust and Emscripten versions are given in the next section.Įmscripten uses a cache to store build artifacts and header files.
