changeset 1550:012ab2c1f23b

notes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Aug 2020 21:00:55 +0200
parents a48ae10857b1
children c54bc5bffd01
files OrthancStone/SharedLibrary/WebAssembly/CMakeLists.txt OrthancStone/SharedLibrary/WebAssembly/NOTES.txt
diffstat 2 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/SharedLibrary/WebAssembly/CMakeLists.txt	Thu Aug 13 15:56:01 2020 +0200
+++ b/OrthancStone/SharedLibrary/WebAssembly/CMakeLists.txt	Thu Aug 13 21:00:55 2020 +0200
@@ -2,6 +2,14 @@
 
 project(OrthancStoneModule)
 
+
+# Warning message related to WebAssembly modules: We know that 1.38.41
+# DOES NOT work, but that 1.39.17 works.
+message("")
+message("=== IMPORTANT: Make sure to use a recent version of Emscripten (preferably >= 2.0.0) ===")
+message("")
+
+
 set(ORTHANC_STONE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../../wasm-binaries/OrthancStoneModule" CACHE PATH "Where to put the WebAssembly binaries")
 
 
@@ -51,7 +59,7 @@
 # The source files that register a callback cannot be part of a side
 # module, and must be compiled in the main module. The following
 # command can be used to identify such files:
-#  $ grep -l -r emscripten_ ../../Sources/
+#  $ grep -lrE 'emscripten_' ../../Sources/
 
 set(SOURCES_WITH_EMSCRIPTEN_CALLBACKS
   ${ORTHANC_STONE_ROOT}/Sources/Oracle/WebAssemblyOracle.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancStone/SharedLibrary/WebAssembly/NOTES.txt	Thu Aug 13 21:00:55 2020 +0200
@@ -0,0 +1,18 @@
+
+Install Emscripten:
+https://emscripten.org/docs/getting_started/downloads.html
+
+# cd ~/Downloads
+# git clone https://github.com/emscripten-core/emsdk.git
+# cd emsdk
+# ./emsdk install 2.0.0
+# ./emsdk activate 2.0.0
+
+
+Then, if the installation path was "~/Downloads/emsdk/":
+
+# source ~/Downloads/emsdk/emsdk_env.sh
+# cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DALLOW_DOWNLOADS=ON -G Ninja
+# ninja install
+
+=> The binaries will be put in "../../../../wasm-binaries/"