Building WebAssembly Applications

This section describes how to build a Web application that has at least one WebAssembly module added.

Building the Hello WebAssembly Application

To build the Hello WebAssembly application:

  1. In the "Project Explorer" view, right-click the Hello WebAssembly application project that you created in Creating WebAssembly Applications.
  2. Select "Build Project". The application project is built.

Building WebAssembly Applications in General

To build a Web application project that includes one or more WebAssembly modules:

  1. Define the build configuration separately for each WebAssembly module in the application.
    If you have multiple modules, they do not need to use the same Samsung Emscripten SDK or build configuration.
    For more information, see Building and Cleaning WebAssembly Modules.

  2. In the "Project Explorer" view, right-click the application project and select "Build Project". The application project is built.

Build artifacts for each WebAssembly module can be found in the CurrentBin directory within the module's project.

Figure 1. Build Results

Figure 1. Build Results

Note

When building the project, the C/C++ code indexer can report code errors even though your WebAssembly module code compiles successfully. To fix this issue:

  1. In the "Project Explorer" view, right-click the WebAssembly project and select "Index > Rebuild".

  2. Check that Samsung Emscripten SDK directories are included in the WebAssembly module project.
    In the "Project Explorer" view, within the WebAssembly module project, expand the "Includes" folder. Make sure that the directories are present.

    Figure 2. Included Toolchain Directories

    Figure 2. Included Toolchain Directories