From 7f6d75cd9e54f01477bafdf6fd6cb3085f45b04c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 15 Apr 2026 15:29:42 -0600 Subject: [PATCH] [util/gpu/web] Export _web_set_palette in both build scripts The previous palette commit added the C entry point and the shell.html message handler but forgot to list _web_set_palette in EXPORTED_FUNCTIONS, so emscripten dead-stripped it and the 'palette' postMessage was a silent no-op in the iframe. Assisted-by: Claude Opus 4.6 (1M context) --- util/gpu/web/build-webgpu.sh | 2 +- util/gpu/web/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/gpu/web/build-webgpu.sh b/util/gpu/web/build-webgpu.sh index 21af97d0f..6b3ddfe22 100755 --- a/util/gpu/web/build-webgpu.sh +++ b/util/gpu/web/build-webgpu.sh @@ -26,7 +26,7 @@ em++ \ "$SRCDIR/util/gpu/web/hb-gpu-web-webgpu.cc" \ --use-port=emdawnwebgpu \ -sALLOW_MEMORY_GROWTH=1 \ - -sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_request_redraw","_web_cancel_gesture","_malloc","_free"]' \ + -sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_set_palette","_web_request_redraw","_web_cancel_gesture","_malloc","_free"]' \ -sEXPORTED_RUNTIME_METHODS='["UTF8ToString","lengthBytesUTF8","stringToUTF8"]' \ --shell-file "$SRCDIR/util/gpu/web/shell.html" \ -o "$OUTDIR/webgpu.html" diff --git a/util/gpu/web/build.sh b/util/gpu/web/build.sh index 5d6408e5d..e8d8644e6 100755 --- a/util/gpu/web/build.sh +++ b/util/gpu/web/build.sh @@ -30,7 +30,7 @@ em++ \ -sUSE_WEBGL2=1 \ -sFULL_ES3=1 \ -sALLOW_MEMORY_GROWTH=1 \ - -sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_toggle_animation","_web_reset","_web_request_redraw","_web_cancel_gesture","_web_pinch","_malloc","_free"]' \ + -sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_set_palette","_web_toggle_animation","_web_reset","_web_request_redraw","_web_cancel_gesture","_web_pinch","_malloc","_free"]' \ -sEXPORTED_RUNTIME_METHODS='["UTF8ToString","lengthBytesUTF8","stringToUTF8"]' \ --shell-file "$SRCDIR/util/gpu/web/shell.html" \ -o "$OUTDIR/index.html"