Skip to content

Commit

Permalink
Filter Executor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi committed Aug 30, 2024
1 parent 8c6feb3 commit 8a99004
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/wasm_build_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 8a99004

Please sign in to comment.