diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 756cd3c2..64275039 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: - arch: arm64_8a platform: linux - arch: wasm64 - platform: linux + platform: unknown permissions: contents: write @@ -91,7 +91,7 @@ jobs: steps: - uses: actions/checkout@v4 - + - uses: actions/setup-python@v5 with: python-version: '3.12' @@ -424,7 +424,7 @@ jobs: - name: Download Artifact uses: actions/download-artifact@v4 with: - name: amalgam-${{ inputs.version }}-linux-wasm64 + name: amalgam-${{ inputs.version }}-unknown-wasm64 - name: Extract Amalgam run: | diff --git a/CMakePresets.json b/CMakePresets.json index 44cd6f9c..75052c40 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -263,7 +263,7 @@ } }, { - "name": "wasm64-release", + "name": "wasm64-release-unknown", "description": "emcc for wasm64 (release)", "inherits": [ "base", "wasm64", "release", "emcc" ], "cacheVariables": { @@ -272,16 +272,6 @@ "CMAKE_TRY_COMPILE_TARGET_TYPE": "STATIC_LIBRARY" } }, - { - "name": "wasm64-release-linux", - "description": "emcc for wasm64 (release) for linux", - "inherits": [ "base", "linux", "wasm64", "release", "emcc" ], - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Linux" - } - }, { "name": "amd64-debug-macos", @@ -362,13 +352,8 @@ "description": "linux arm64_8a release build" }, { - "name": "wasm64-release-linux", - "configurePreset": "wasm64-release-linux", - "description": "linux wasm64 release build" - }, - { - "name": "wasm64-release", - "configurePreset": "wasm64-release", + "name": "wasm64-release-unknown", + "configurePreset": "wasm64-release-unknown", "description": "wasm64 release build" }, { @@ -450,10 +435,10 @@ "configurePreset": "arm64_8a-debug-linux" }, { - "name": "wasm64-release-linux", - "description": "linux wasm64 release tests", + "name": "wasm64-release-unknown", + "description": "wasm64 release tests", "inherits": "base", - "configurePreset": "wasm64-release-linux" + "configurePreset": "wasm64-release-unknown" }, { "name": "amd64-release-macos", diff --git a/build/cmake/global_compiler_flags.cmake b/build/cmake/global_compiler_flags.cmake index 05f735ec..3be46417 100644 --- a/build/cmake/global_compiler_flags.cmake +++ b/build/cmake/global_compiler_flags.cmake @@ -75,7 +75,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" S # TODO 1599: WASM support is experimental, these flags will be cleaned up and auto-generated where possible if(IS_WASM) string(APPEND CMAKE_CXX_FLAGS " -sMEMORY64=2 -Wno-experimental -DSIMDJSON_NO_PORTABILITY_WARNING") - string(APPEND CMAKE_EXE_LINKER_FLAGS " -sINVOKE_RUN=0 -sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=65536000 -sMEMORY_GROWTH_GEOMETRIC_STEP=0.50 -sMODULARIZE=1 -sEXPORT_NAME=AmalgamRuntime -sENVIRONMENT=worker -sEXPORTED_RUNTIME_METHODS=cwrap,ccall,FS,setValue,getValue,UTF8ToString -sEXPORTED_FUNCTIONS=_malloc,_free,_LoadEntity,_LoadEntityLegacy,_VerifyEntity,_StoreEntity,_ExecuteEntity,_ExecuteEntityJsonPtr,_DestroyEntity,_GetEntities,_SetRandomSeed,_SetJSONToLabel,_GetJSONPtrFromLabel,_SetSBFDataStoreEnabled,_IsSBFDataStoreEnabled,_GetVersionString,_SetMaxNumThreads,_GetMaxNumThreads,_GetConcurrencyTypeString,_DeleteString --preload-file /wasm/tzdata@/tzdata --preload-file /wasm/etc@/etc") + string(APPEND CMAKE_EXE_LINKER_FLAGS " -sINVOKE_RUN=0 -sALLOW_MEMORY_GROWTH=1 -sINITIAL_MEMORY=65536000 -sMEMORY_GROWTH_GEOMETRIC_STEP=0.50 -sMODULARIZE=1 -sEXPORT_NAME=AmalgamRuntime -sENVIRONMENT=worker,node -sEXPORTED_RUNTIME_METHODS=cwrap,ccall,FS,setValue,getValue,UTF8ToString -sEXPORTED_FUNCTIONS=_malloc,_free,_LoadEntity,_CloneEntity,_VerifyEntity,_StoreEntity,_ExecuteEntity,_ExecuteEntityJsonPtr,_DestroyEntity,_GetEntities,_SetRandomSeed,_SetJSONToLabel,_GetJSONPtrFromLabel,_SetSBFDataStoreEnabled,_IsSBFDataStoreEnabled,_GetVersionString,_SetMaxNumThreads,_GetMaxNumThreads,_GetConcurrencyTypeString,_DeleteString --preload-file /wasm/tzdata@/tzdata --preload-file /wasm/etc@/etc") endif() elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") diff --git a/build/wasm/amalgam-wasm.d.cts b/build/wasm/amalgam-wasm.d.cts index a2bcf1a0..015ac68b 100644 --- a/build/wasm/amalgam-wasm.d.cts +++ b/build/wasm/amalgam-wasm.d.cts @@ -1,3 +1,2 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ export = AmalgamRuntime; declare function AmalgamRuntime(overrides?: Partial): Promise; diff --git a/test/wasm_test/.env.sample b/test/wasm_test/.env.sample deleted file mode 100644 index 3b962306..00000000 --- a/test/wasm_test/.env.sample +++ /dev/null @@ -1 +0,0 @@ -AMALGAM_WASM_DIR=../../.out/build \ No newline at end of file diff --git a/test/wasm_test/jest.config.mjs b/test/wasm_test/jest.config.mjs index 8afd5162..3c25e02b 100644 --- a/test/wasm_test/jest.config.mjs +++ b/test/wasm_test/jest.config.mjs @@ -60,7 +60,7 @@ const config = { // forceCoverageMatch: [], // A path to a module which exports an async function that is triggered once before all test suites - globalSetup: "./jest/global.setup.js", + // globalSetup: "./jest/global.setup.js", // A path to a module which exports an async function that is triggered once after all test suites // globalTeardown: undefined, diff --git a/test/wasm_test/jest/global.setup.js b/test/wasm_test/jest/global.setup.js deleted file mode 100644 index e516646a..00000000 --- a/test/wasm_test/jest/global.setup.js +++ /dev/null @@ -1,5 +0,0 @@ -import { config } from "dotenv"; - -export default async () => { - config(); -}; diff --git a/test/wasm_test/package-lock.json b/test/wasm_test/package-lock.json index ff12ef37..fcebe0b8 100644 --- a/test/wasm_test/package-lock.json +++ b/test/wasm_test/package-lock.json @@ -10,7 +10,6 @@ "license": "UNLICENSED", "devDependencies": { "@babel/preset-env": "^7.24.8", - "dotenv": "^16.4.5", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0" }, @@ -2999,18 +2998,6 @@ "node": ">=12" } }, - "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, "node_modules/electron-to-chromium": { "version": "1.4.832", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", @@ -4442,12 +4429,12 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { diff --git a/test/wasm_test/package.json b/test/wasm_test/package.json index 403656e3..6e45a97a 100644 --- a/test/wasm_test/package.json +++ b/test/wasm_test/package.json @@ -11,7 +11,6 @@ }, "devDependencies": { "@babel/preset-env": "^7.24.8", - "dotenv": "^16.4.5", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0" }