A container for building Qt applications for the web platform using Qt for WebAssembly.
This container is based on the official emscripten docker image emscripten/emsdk.
The concourse pipeline is constantly building images and putting them on dockerhub madmanfred/qt-webassembly.
Please create issues related to this image on the associated GitHub project.
docker run --rm -v $(pwd):/src/ -u $(id -u):$(id -g) madmanfred/qt-webassembly qmake
docker run --rm -v $(pwd):/src/ -u $(id -u):$(id -g) madmanfred/qt-webassembly make
docker run --rm -v $(PWD):/src/ madmanfred/qt-webassembly qmake
docker run --rm -v $(PWD):/src/ madmanfred/qt-webassembly make
Here are some tips to speed up your builds for Qt for WebAssembly:
-
You can add this to use a local directory as cache:
-v ~/.emscripten_cache:/emsdk_portable/.data/cache
-
If you use some of the emscripten ported libraries, you can reduce the build time by a few seconds by caching
/emsdk_portable/.data/ports
. -
You can also increase the compilation speed a bit by using a parallel build (
make -j
). -
If you disable all optimizations you can reduce your build time significantly. Just add this to your project file:
QMAKE_CXXFLAGS_RELEASE -= -O3 QMAKE_CXXFLAGS_RELEASE *= -O0 QMAKE_LFLAGS_RELEASE -= -O3 QMAKE_LFLAGS_RELEASE *= -O0