Skip to content

Commit 2720c85

Browse files
committed
Move WASM build to Makefile, rebuild wasm2js
1 parent 678c4fe commit 2720c85

File tree

7 files changed

+109
-12
lines changed

7 files changed

+109
-12
lines changed

Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ build: lint
2020
cd src/compiled \
2121
&& cp -r * ../../dist/assets/
2222

23+
src/compiled: experiments/Dockerfile
24+
docker build --tag scip-wasm:latest experiments
25+
docker run --rm -itd --name emcc scip-wasm:latest sleep infinity
26+
rm -rfv src/compiled
27+
docker cp emcc:/scipoptsuite-8.1.0/build/bin/ src/compiled
28+
find src/compiled ! -iname '*scip*' -type f -exec rm -v '{}' \;
29+
docker kill emcc

experiments/Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ RUN curl -o 'scipoptsuite-8.1.0.tgz' 'https://scipopt.org/download/release/scipo
5050

5151
WORKDIR /scipoptsuite-8.1.0
5252
# RUN vcpkg install gmp:wasm32-emscripten
53-
# ENV CXXFLAGS="-sINVOKE_RUN=0 -sFILESYSTEM=1 -sFORCE_FILESYSTEM=1 -sMODULARIZE=1 -sEXPORT_NAME=createSCIP - sEXPORTED_RUNTIME_METHODS=FS,callMain -sEXPORT_ES6=1 -sWASM=2"
54-
ENV CXXFLAGS="-sINVOKE_RUN=0 -sFILESYSTEM=1 -sFORCE_FILESYSTEM=1 -sMODULARIZE=1 -sEXPORT_NAME=createSCIP -sEXPORTED_RUNTIME_METHODS=FS,callMain -sEXPORT_ES6=1 -sWASM=1 -sEXCEPTION_STACK_TRACES=1 -sDISABLE_EXCEPTION_CATCHING=0"
53+
ENV CXXFLAGS="-sINVOKE_RUN=0 -sFILESYSTEM=1 -sFORCE_FILESYSTEM=1 -sMODULARIZE=1 -sEXPORT_NAME=createSCIP -sEXPORTED_RUNTIME_METHODS=FS,callMain -sEXPORT_ES6=1 -sWASM=2 -sEXCEPTION_STACK_TRACES=1 -sDISABLE_EXCEPTION_CATCHING=0"
5554
RUN mkdir build \
5655
&& cd build \
5756
&& emcmake cmake .. -DNO_EXTERNAL_CODE=on -DBUILD_TESTING=off \

experiments/copy_compiled.sh

-9
This file was deleted.

src/compiled/scip.js

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

src/compiled/scip.js.mem

417 KB
Binary file not shown.

src/compiled/scip.wasm

-414 KB
Binary file not shown.

src/compiled/scip.wasm.js

+100
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)