From d0134e6790d96582a1311192b1484f679d8ad1bf Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:33:54 +0100 Subject: [PATCH 01/12] emscripten --- .github/workflows/ci.yaml | 34 ++++++++++++++++------------------ environment_emscripten.yml | 2 +- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f04e5cd..7656e12 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -174,25 +174,23 @@ jobs: - name: install emscripten shell: bash -l {0} run: | - git clone https://github.com/emscripten-core/emsdk.git - cd emsdk - ./emsdk install ${{ matrix.emscripten_version }} - source ./emsdk_env.sh + $MAMBA_EXE create -n emsdk -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ + emscripten_emscripten-wasm32 + + - name: install playwright + shell: bash -l {0} + run: | + playwright install - #- name: install playwright - # shell: bash -l {0} - # run: | - # playwright install - - #- name: run emscripten tests - # shell: bash -l {0} - # run: | - # cd emsdk - # ./emsdk activate ${{ matrix.emscripten_version }} - # source ./emsdk_env.sh - # cd .. - # chmod +x ./test/emscripten/test_emscripten.sh - # ./test/emscripten/test_emscripten.sh + - name: run emscripten tests + shell: bash -l {0} + run: | + cd emsdk + ./emsdk activate ${{ matrix.emscripten_version }} + source ./emsdk_env.sh + cd .. + chmod +x ./test/emscripten/test_emscripten.sh + ./test/emscripten/test_emscripten.sh docs: strategy: diff --git a/environment_emscripten.yml b/environment_emscripten.yml index cc31667..7aff05e 100644 --- a/environment_emscripten.yml +++ b/environment_emscripten.yml @@ -6,4 +6,4 @@ channels: dependencies: - cmake - python - - microsoft::playwright + - microsoft::playwright <= 1.50 From 04dd65dc3e3ac434c5807663ef674153b11e69f0 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:36:50 +0100 Subject: [PATCH 02/12] emscripten --- .github/workflows/ci.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7656e12..ca3cff8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -174,7 +174,7 @@ jobs: - name: install emscripten shell: bash -l {0} run: | - $MAMBA_EXE create -n emsdk -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ + $MAMBA_EXE install -n emsdk -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ emscripten_emscripten-wasm32 - name: install playwright @@ -185,10 +185,6 @@ jobs: - name: run emscripten tests shell: bash -l {0} run: | - cd emsdk - ./emsdk activate ${{ matrix.emscripten_version }} - source ./emsdk_env.sh - cd .. chmod +x ./test/emscripten/test_emscripten.sh ./test/emscripten/test_emscripten.sh From 909aecce639c40757b04ab59d41fdd9c38db7870 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:38:47 +0100 Subject: [PATCH 03/12] emscripten --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ca3cff8..4e84f7a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -174,7 +174,7 @@ jobs: - name: install emscripten shell: bash -l {0} run: | - $MAMBA_EXE install -n emsdk -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ + $MAMBA_EXE install -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ emscripten_emscripten-wasm32 - name: install playwright From 8e8912aadba9240470cb2b21acc8465bcdadfdf4 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:39:48 +0100 Subject: [PATCH 04/12] yes --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4e84f7a..c7720c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -175,7 +175,7 @@ jobs: shell: bash -l {0} run: | $MAMBA_EXE install -c conda-forge -c https://repo.prefix.dev/emscripten-forge-dev \ - emscripten_emscripten-wasm32 + emscripten_emscripten-wasm32 --yes - name: install playwright shell: bash -l {0} From 2c4f6d68b8d83e0147abab50c468c1463af48599 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:43:36 +0100 Subject: [PATCH 05/12] yes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6165feb..df83f9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,7 @@ if(EMSCRIPTEN) # compiler flags set_target_properties(xplugin_host PROPERTIES COMPILE_FLAGS "-s MAIN_MODULE=1") set_target_properties(xplugin_plugin PROPERTIES COMPILE_FLAGS "-s SIDE_MODULE=1") - set_target_properties(xplugin_host PROPERTIES LINK_FLAGS "-s MAIN_MODULE=1") + set_target_properties(xplugin_host PROPERTIES LINK_FLAGS "-s MAIN_MODULE=1 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS']\"") set_target_properties(xplugin_plugin PROPERTIES LINK_FLAGS "-s SIDE_MODULE=1") endif() From 626abb7724fdecd9542363e52c1e69f8d81a6714 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:48:16 +0100 Subject: [PATCH 06/12] yes --- CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df83f9c..9511f05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,10 +81,15 @@ endif() # Flags ################################################################ if(EMSCRIPTEN) + + + + + # compiler flags set_target_properties(xplugin_host PROPERTIES COMPILE_FLAGS "-s MAIN_MODULE=1") set_target_properties(xplugin_plugin PROPERTIES COMPILE_FLAGS "-s SIDE_MODULE=1") - set_target_properties(xplugin_host PROPERTIES LINK_FLAGS "-s MAIN_MODULE=1 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['FS']\"") + set_target_properties(xplugin_host PROPERTIES LINK_FLAGS "-s MAIN_MODULE=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS']") set_target_properties(xplugin_plugin PROPERTIES LINK_FLAGS "-s SIDE_MODULE=1") endif() From 4fcd9226659dd82d523fbbab50ca28afcbdac689 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:52:28 +0100 Subject: [PATCH 07/12] yes --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9511f05..5dff1e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,12 +84,16 @@ if(EMSCRIPTEN) - + set(EMS + "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS']" + ) + target_compile_options(xplugin_host PRIVATE ${EMS}) + target_link_options(xplugin_host PRIVATE ${EMS}) # compiler flags set_target_properties(xplugin_host PROPERTIES COMPILE_FLAGS "-s MAIN_MODULE=1") set_target_properties(xplugin_plugin PROPERTIES COMPILE_FLAGS "-s SIDE_MODULE=1") - set_target_properties(xplugin_host PROPERTIES LINK_FLAGS "-s MAIN_MODULE=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS']") + set_target_properties(xplugin_host PROPERTIES LINK_FLAGS "-s MAIN_MODULE=1") set_target_properties(xplugin_plugin PROPERTIES LINK_FLAGS "-s SIDE_MODULE=1") endif() From afebf24cd78f6f6557c4361f5a98cbf7abe3b0cf Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:55:19 +0100 Subject: [PATCH 08/12] yes --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dff1e7..653e5d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,8 +87,8 @@ if(EMSCRIPTEN) set(EMS "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS']" ) - target_compile_options(xplugin_host PRIVATE ${EMS}) - target_link_options(xplugin_host PRIVATE ${EMS}) + target_compile_options(xplugin_host INTERFACE ${EMS}) + target_link_options(xplugin_host INTERFACE ${EMS}) # compiler flags set_target_properties(xplugin_host PROPERTIES COMPILE_FLAGS "-s MAIN_MODULE=1") From 4d96f0d80043e4b6874541688bdd4e78e750bbbc Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 08:58:33 +0100 Subject: [PATCH 09/12] yes --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 653e5d5..456654d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,11 +82,7 @@ endif() ################################################################ if(EMSCRIPTEN) - - - set(EMS - "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS']" - ) + set(EMS "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS', 'PATH']") target_compile_options(xplugin_host INTERFACE ${EMS}) target_link_options(xplugin_host INTERFACE ${EMS}) From af46b5f6d2f3e24064962dc73e5cfa85e43c4d28 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 09:02:42 +0100 Subject: [PATCH 10/12] yes --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 456654d..db113f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,11 @@ endif() ################################################################ if(EMSCRIPTEN) - set(EMS "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS', 'PATH']") + + + set(EMS + "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS','PATH']" + ) target_compile_options(xplugin_host INTERFACE ${EMS}) target_link_options(xplugin_host INTERFACE ${EMS}) From 5940d4abc2ded5d96e13ca3c04715d9901deb349 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 09:05:21 +0100 Subject: [PATCH 11/12] yes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db113f2..bd1f156 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,7 +85,7 @@ if(EMSCRIPTEN) set(EMS - "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS','PATH']" + "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS','PATH','loadDynamicLibrary']" ) target_compile_options(xplugin_host INTERFACE ${EMS}) target_link_options(xplugin_host INTERFACE ${EMS}) From 780bd24f4347414f26f9535595557647364fa048 Mon Sep 17 00:00:00 2001 From: DerThorsten Date: Fri, 21 Mar 2025 09:09:51 +0100 Subject: [PATCH 12/12] cleanup --- .github/workflows/ci.yaml | 3 --- CMakeLists.txt | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7720c6..c366594 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -151,9 +151,6 @@ jobs: emscripten: strategy: - matrix: - include: - - emscripten_version: 3.1.27 fail-fast: false runs-on: ubuntu-latest steps: diff --git a/CMakeLists.txt b/CMakeLists.txt index bd1f156..863f4b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,12 +81,8 @@ endif() # Flags ################################################################ if(EMSCRIPTEN) - - - - set(EMS - "SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS','PATH','loadDynamicLibrary']" - ) + # extra flags to ensure runtime methods are exported + set(EMS"SHELL: -s EXTRA_EXPORTED_RUNTIME_METHODS=['FS','PATH','loadDynamicLibrary']") target_compile_options(xplugin_host INTERFACE ${EMS}) target_link_options(xplugin_host INTERFACE ${EMS})