.. _doc_compiling_for_web: Compiling for the Web ===================== .. seealso:: This page describes how to compile HTML5 editor and export template binaries from source. If you're looking to export your project to HTML5 instead, read `doc_exporting_for_web`. Requirements ------------ To compile export templates for the Web, the following is required: - `Emscripten 1.39.9+ ( https://emscripten.org )`. - `Python 3.5+ ( https://www.python.org/ )`. - `SCons 3.0+ ( https://www.scons.org )` build system. .. seealso:: To get the Godot source code for compiling, see `doc_getting_source`. For a general overview of SCons usage for Godot, see `doc_introduction_to_the_buildsystem`. Building export templates ------------------------- Before starting, confirm that `emcc` is available in your PATH. This is usually configured by the Emscripten SDK, e.g. when invoking `emsdk activate` and `source ./emsdk_env.sh`/`emsdk_env.bat`. Open a terminal and navigate to the root directory of the engine source code. Then instruct SCons to build the JavaScript platform. Specify `target` as either `release` for a release build or `release_debug` for a debug build:: scons platform=javascript tools=no target=release scons platform=javascript tools=no target=release_debug By default, the `JavaScript singleton