Skip to content

Commit d0d3047

Browse files
authored
Disable emscripten dynamic execution (#159)
* (wasm|bundle).sh: use /usr/bin/env for portability * Emscripten: disable dynamic execution to avoid CSP violations (#158) * js: update laz-perf.js and laz-perf.wasm
1 parent 2b68700 commit d0d3047

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed

cpp/emscripten/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ endif()
1919
if (WASM)
2020
message(STATUS "WASM Emscripten output has been enabled")
2121
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s WASM=1 -s \"BINARYEN_METHOD='native-wasm'\"")
22-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s MODULARIZE=1")
22+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s MODULARIZE=1 -s DYNAMIC_EXECUTION=0")
2323
if (ESM)
2424
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORT_ES6=1")
2525
else (ESM)

js/bundle.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e
44
cd "$(dirname "$0")"

js/src/laz-perf.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/src/laz-perf.wasm

-266 Bytes
Binary file not shown.

js/wasm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This script generates:
44
# The actual WASM:

0 commit comments

Comments
 (0)