Skip to content

Commit

Permalink
Merge pull request #480 from permaweb/twilson63/feat-loader-add-max-m…
Browse files Browse the repository at this point in the history
…emory

feat: added _maxMemory argument to AoLoader
  • Loading branch information
twilson63 authored Feb 17, 2024
2 parents db204a1 + 99bbac3 commit 73f38bd
Show file tree
Hide file tree
Showing 4 changed files with 3,819 additions and 105 deletions.
4 changes: 2 additions & 2 deletions dev-cli/container/src/emcc-lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def main():

# Finally, compile to wasm
debug_print('Start to compile as WASM')
cmd = ['emcc', '-Os', '-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'INITIAL_MEMORY=6291456', '-s', 'MAXIMUM_MEMORY=524288000', '-s', 'WASM=1', '-s', 'MODULARIZE', '-s', 'FILESYSTEM=0', '-s', 'DETERMINISTIC=1', '-s', 'NODERAWFS=0', '--pre-js', '/opt/pre.js']
cmd = ['emcc', '-O0', '-s', 'ALLOW_MEMORY_GROWTH=1', '-s', 'INITIAL_MEMORY=6291456', '-s', 'MAXIMUM_MEMORY=524288000', '-s', 'WASM=1', '-s', 'MODULARIZE', '-s', 'FILESYSTEM=0', '-s', 'DETERMINISTIC=1', '-s', 'NODERAWFS=0', '--pre-js', '/opt/pre.js']
cmd.extend(definition.get_extra_args())
cmd.extend(['-I', quote('/lua-{}/src'.format(os.environ.get('LUA_VERSION')))])
cmd.extend(['/tmp/compile.c', quote('/lua-{}/src/liblua.a'.format(os.environ.get('LUA_VERSION')))])
Expand All @@ -178,7 +178,7 @@ def main():
# add metering library
meter_cmd = ['node', '/opt/node/apply-metering.cjs']
shell_exec(*meter_cmd)
shell_exec(*['rm', '/src/process.js'])
# shell_exec(*['rm', '/src/process.js'])

if __name__ == '__main__':
main()
Expand Down
Loading

0 comments on commit 73f38bd

Please sign in to comment.