Skip to content

Instantly share code, notes, and snippets.

View igormcoelho's full-sized avatar

Igor Machado Coelho igormcoelho

View GitHub Profile
@igormcoelho
igormcoelho / compile.sh
Last active May 28, 2020 21:15
Bundle (webkit) C++ on emscripten (1.39.4) with external node.js dependency
#!/bin/bash
docker run --rm -v $(pwd):/src trzeci/emscripten em++ --pre-js prefix-node-require.js --std=c++17 -g -O3 -Wall -s WASM=1 -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap", "UTF8ToString", "stringToUTF8"]' -s DISABLE_EXCEPTION_CATCHING=1 -s ALLOW_MEMORY_GROWTH=1 -s MODULARIZE=1 -s 'EXPORT_NAME="ourtest"' --js-library general-exports.js -I./thirdparty/my-cpp-library/ -o ourtest.js mycode.cpp