Setting Emscripten SDK
This section describes how to select and set an instance of the Emscripten SDK for developing WebAssembly modules in TV applications.
The Emscripten SDK can be set both for a TV application project that holds WebAssembly modules and for the modules individually.
Once it is set for any TV application project, each newly added WebAssembly module inherits and uses that setting by default.
Setting Emscripten SDK for WebAssembly modules
Right-click the WebAssembly module to set.
Select WebAssembly > Configure WebAssembly Toolchain.
In the "Configuration file" field either manually enter the absolute path to the Emscripten SDK configuration file or click the "Browse" button to select it from the file dialog.
Setting the path to the proper configuration file is required: without properly configured Emscripten SDK you will not be able to build WebAssembly modules.
The configuration file is created when the Emscripten SDK is activated and it is typically located in the user's home directory:
- /home/<user>/.emscripten - in case of Linux OS
- /Users/<user>/.emscripten - in case of Mac OS
- C:\Users\<user>\.emscripten - in case of Windows OS
Once it is created, its path must be put into the "Configuration file" field.
In the "Cache directory" field either manually enter the absolute path to the cache directory that will be used by the Emscripten SDK or click the "Browse" button to select it from the directory dialog. It is strongly recommended that you set different cache directory for each of different versions of Emscripten SDKs that you may have installed on your computer - otherwise build errors may occur.
You may also want to set different cache directory for each WebAssembly module: since it might be sometimes required to clear the cache, such setup ensures that the clearing will not impact other modules.
The directory does not need to exist prior to selecting it, because it will be created on the first build if it does not exist. However, it is also created during the Emscripten activation and selected libraries may be pre-cached there, which speeds-up subsequent builds. Thus it is recommended to select the same cache directory as was created during the activation. It is usually located in the home directory, similar to the configuration file. If the EM_CACHE environment variable was defined prior the activation, its value is used instead and the cache directory is created at that location.