From 8a99004c99a06c2b16aac8b180d13ca266ebd746 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Fri, 30 Aug 2024 11:04:54 +0200 Subject: [PATCH] Filter Executor stuff --- scripts/wasm_build_lib.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/wasm_build_lib.sh b/scripts/wasm_build_lib.sh index 2983a6a78..68e6a9c1e 100755 --- a/scripts/wasm_build_lib.sh +++ b/scripts/wasm_build_lib.sh @@ -72,6 +72,11 @@ emmake make \ npm install -g js-beautify js-beautify ${BUILD_DIR}/duckdb_wasm.js > ${BUILD_DIR}/beauty.js awk '!(/var .*wasmExports\[/ || /var [_a-z0-9A-Z]+ = Module\[\"[_a-z0-9A-Z]+\"\] = [0-9]+;/) || /var _duckdb_web/ || /var _main/ || /var _malloc/ || /var _free/ || /var stack/ || /var ___dl_seterr/ || /var __em/ || /var _em/ || /var _pthread/' ${BUILD_DIR}/beauty.js > ${BUILD_DIR}/duckdb_wasm.js +cp ${BUILD_DIR}/duckdb_wasm.wasm ${BUILD_DIR}/duckdb_wasm_origin.wasm +wasm2wat --enable-all ${BUILD_DIR}/duckdb_wasm.wasm > ${BUILD_DIR}/duckdb_wat.wat +grep -v "export.*Executor" ${BUILD_DIR}/duckdb_wat.wat > ${BUILD_DIR}/duckdb_wat_filtered.wat +wat2wasm --enable-all ${BUILD_DIR}/duckdb_wat_filtered.wat -o ${BUILD_DIR}/duckdb_wasm.wasm + cp ${BUILD_DIR}/duckdb_wasm.wasm ${DUCKDB_LIB_DIR}/duckdb${SUFFIX}.wasm sed \