From 17cc33f23b788f4779673d0682fbd060f292bb6b Mon Sep 17 00:00:00 2001 From: juztamau5 Date: Sun, 10 Mar 2024 23:21:23 -0700 Subject: [PATCH] fixup! Import initial engine in C++ compiled to WASM --- .github/workflows/nodejs.yml | 2 +- src/frontend/.eslintignore | 3 +++ src/frontend/.gitignore | 3 +++ src/frontend/.prettierignore | 3 +++ tools/build-wasm.sh | 3 +++ 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b347a30a0..8e5dfa602 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -64,7 +64,7 @@ jobs: uses: actions/cache@v4 with: path: | - tools/install + src/frontend/public/wasm key: cache-wasm-${{ matrix.os }}-${{ matrix.node-version }}-${{ hashFiles('src/engine/**', 'tools/build-wasm.sh', 'tools/download-emscripten.sh') }} - name: Setup Node.js ${{ matrix.node-version }} diff --git a/src/frontend/.eslintignore b/src/frontend/.eslintignore index 76d9a19db..0ec1c7422 100644 --- a/src/frontend/.eslintignore +++ b/src/frontend/.eslintignore @@ -2,3 +2,6 @@ /dist /node_modules /pnpm-lock.yaml + +# Generated WASM libraries +/public/wasm diff --git a/src/frontend/.gitignore b/src/frontend/.gitignore index 61fae8c9e..dd1cc2a28 100644 --- a/src/frontend/.gitignore +++ b/src/frontend/.gitignore @@ -2,3 +2,6 @@ /dist /node_modules /yarn-*.log* + +# Generated WASM libraries +/public/wasm diff --git a/src/frontend/.prettierignore b/src/frontend/.prettierignore index 76d9a19db..0ec1c7422 100644 --- a/src/frontend/.prettierignore +++ b/src/frontend/.prettierignore @@ -2,3 +2,6 @@ /dist /node_modules /pnpm-lock.yaml + +# Generated WASM libraries +/public/wasm diff --git a/tools/build-wasm.sh b/tools/build-wasm.sh index 52b248755..430acd786 100755 --- a/tools/build-wasm.sh +++ b/tools/build-wasm.sh @@ -66,3 +66,6 @@ emcmake cmake \ cmake \ --build "${BUILD_DIRECTORY}" \ --target install + +# Copy the generated libraries to the public directory +cp -rv "${INSTALL_DIRECTORY}/wasm" "${PROJECT_DIRECTORY}/src/frontend/public"