Skip to content

Commit

Permalink
Merge pull request #624 from permaweb/MichaelBuhler/wasm64
Browse files Browse the repository at this point in the history
feat: build memory64 wasm modules
  • Loading branch information
twilson63 authored Apr 22, 2024
2 parents d9a029d + e7122e3 commit 9ea34e6
Show file tree
Hide file tree
Showing 11 changed files with 6,146 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dev-cli/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM emscripten/emsdk:3.1.14
FROM emscripten/emsdk:3.1.55
LABEL maintainer "tom wilson <[email protected]>"

# The working directory used by the base image is /src, so we can mount volumes to there
Expand Down Expand Up @@ -50,7 +50,7 @@ RUN npm --version
# And, re-compile lua with "generic WASM"
RUN cd /lua-${LUA_VERSION} && \
make clean && \
make generic CC='emcc -s WASM=1 -U LUA_32BITS'
make generic CC='emcc -s WASM=1 -s MEMORY64=1 -s SUPPORT_LONGJMP=1'

#############################
##### Install Commands ######
Expand Down
3 changes: 2 additions & 1 deletion dev-cli/container/src/emcc-lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ def main():

# Finally, compile to wasm
debug_print('Start to compile as WASM')
cmd = ['emcc', '-Os',
cmd = ['emcc', '-O0',
'-s', 'MEMORY64=1',
'-s', 'ALLOW_MEMORY_GROWTH=1',
'-s', 'INITIAL_MEMORY=6291456',
'-s', 'MAXIMUM_MEMORY=524288000',
Expand Down
2 changes: 1 addition & 1 deletion dev-cli/container/src/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"mime-types": "^2.1.35",
"url-join": "^5.0.0",
"warp-arbundles": "^1.0.4",
"wasm-metering": "^0.2.1"
"wasm-metering": "permaweb/wasm-metering#v0.2.2"
},
"engines": {
"node": ">=18"
Expand Down
4 changes: 2 additions & 2 deletions dev-cli/src/versions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
export const VERSION = {
"CLI": "0.0.53",
"IMAGE": "0.0.33"
"CLI": "0.0.54",
"IMAGE": "0.0.34"
}
4 changes: 2 additions & 2 deletions loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"build": "npm run build:types && npm run build:src",
"build:src": "node esbuild.js",
"build:types": "tsc src/index.cjs --declaration --allowJs --emitDeclarationOnly --outDir dist",
"test": "npm run build && node --test",
"test:integration": "npm run build && MODULE_PATH='../dist/index.cjs' node --test"
"test": "npm run build && node --experimental-wasm-memory64 --test",
"test:integration": "npm run build && MODULE_PATH='../dist/index.cjs' node --experimental-wasm-memory64 --test"
},
"dependencies": {},
"devDependencies": {
Expand Down
Loading

0 comments on commit 9ea34e6

Please sign in to comment.