46:7230a1ed6e8f default tip
Anton Shestakov <av6@dwimlabs.net>, Fri, 03 Dec 2021 09:48:35 +0300
index: update a source code link in the footer to not point to a dead site

previous change 30:b02a3ab35cfe

recipe.sh

Permissions: -rw-r--r--

Other formats: Feeds:
#!/bin/sh
echo "Don't run this script directly, it's not ready for that yet."
echo "Instead, read through it and hand-pick statements that you need."
exit 1
# cd game-music-player
# mkdir build
# cd build
emcmake cmake ../
emmake make gme
(
printf '['
grep -P '(?<=Module\.)[a-zA-Z][a-zA-Z0-9_]+' -o player.js | sort -u | awk '{printf "\"" $0 "\", "}' | sed '$s/, $//'
echo ']'
) > runtime_methods.json
# Original, big and inclusive
emcc gme/libgme.so -o libgme.O0.js -O0 -s LINKABLE=1 -s EXPORT_ALL=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=@runtime_methods.json -s WASM=0
(
echo '['
grep -E 'gme_[a-z0-9_]+' -o player.js | sort -u | awk '{printf " \"_" $0 "\",\n"}' | sed '$s/,$//'
echo ']'
) > exported_functions.json
# Smaller and hand-picked
emcc gme/libgme.so -o libgme.O2.js -O2 -s NO_FILESYSTEM=1 -s EXPORTED_FUNCTIONS=@exported_functions.json -s EXTRA_EXPORTED_RUNTIME_METHODS=@runtime_methods.json -s WASM=0
# Smaller still
emcc gme/libgme.so -o libgme.Oz.js -Oz --llvm-lto 1 -s NO_FILESYSTEM=1 -s EXPORTED_FUNCTIONS=@exported_functions.json -s EXTRA_EXPORTED_RUNTIME_METHODS=@runtime_methods.json -s WASM=0