Up to date

This page is up to date for Godot 4.0. If you still find outdated information, please open an issue.

Compiling for the Web

See also

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 Exporting for the Web.

Requirements

To compile export templates for the Web, the following is required:

See also

To get the Godot source code for compiling, see Getting the source.

For a general overview of SCons usage for Godot, see 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 Web platform. Specify target as either template_release for a release build or template_debug for a debug build:

scons platform=web target=template_release
scons p