@@ -92,7 +92,7 @@ def host_specific():
9292 'x86_64-linux' ,
9393 'wasi-sdk' ,
9494 'x86_64-linux' ,
95- 'dist/wasi-sdk-26 .0-x86_64-linux.tar.gz' ,
95+ 'dist/wasi-sdk-27 .0-x86_64-linux.tar.gz' ,
9696 'wasmtime' ,
9797 'nodejs' ,
9898 'cabal' ,
@@ -108,7 +108,7 @@ def host_specific():
108108 'aarch64-linux' ,
109109 'wasi-sdk-aarch64-linux' ,
110110 'aarch64-linux' ,
111- 'dist/wasi-sdk-26 .0-aarch64-linux.tar.gz' ,
111+ 'dist/wasi-sdk-27 .0-aarch64-linux.tar.gz' ,
112112 'wasmtime_aarch64_linux' ,
113113 'nodejs_aarch64_linux' ,
114114 'cabal_aarch64_linux' ,
@@ -124,7 +124,7 @@ def host_specific():
124124 'aarch64-apple-darwin' ,
125125 'wasi-sdk-aarch64-darwin' ,
126126 'aarch64-darwin' ,
127- 'dist/wasi-sdk-26 .0-arm64-macos.tar.gz' ,
127+ 'dist/wasi-sdk-27 .0-arm64-macos.tar.gz' ,
128128 'wasmtime_aarch64_darwin' ,
129129 'nodejs_aarch64_darwin' ,
130130 'cabal_aarch64_darwin' ,
@@ -139,7 +139,7 @@ def host_specific():
139139 'x86_64-apple-darwin' ,
140140 'wasi-sdk-x86_64-darwin' ,
141141 'x86_64-darwin' ,
142- 'dist/wasi-sdk-26 .0-arm64-macos.tar.gz' ,
142+ 'dist/wasi-sdk-27 .0-arm64-macos.tar.gz' ,
143143 'wasmtime_x86_64_darwin' ,
144144 'nodejs_x86_64_darwin' ,
145145 'cabal_x86_64_darwin' ,
@@ -196,8 +196,14 @@ def setup_wasi_sdk():
196196 run_curl (jq_autogen ('binaryen' ), 'binaryen' , pipe_to = 'tar xz -C %s --no-same-owner --strip-components=1' )
197197 run_cmd (['cp' , 'binaryen/bin/wasm-opt' , f'{ WASI_SDK_ROOT } /bin' ])
198198
199+ print ('--- Setting up nodejs ---' )
200+ if path_is_fresh ('nodejs' ):
201+ run_cmd (['mkdir' , '-p' , 'nodejs' ])
202+ run_curl (jq_autogen ('nodejs' ), 'nodejs' , pipe_to = 'tar xJ -C %s --no-same-owner --strip-components=1' )
203+ run_cmd (['cp' , '-r' , 'nodejs' , PREFIX ])
204+
199205# utilities are NOT included, please install them by yourself:
200- # nodejs, playwright, wabt, wasmtime
206+ # playwright, wabt, wasmtime
201207
202208def setup_wasm_run ():
203209 pass
@@ -275,6 +281,7 @@ def write_env_files(envs):
275281 envfile .write (f'prepend_path "{ cabal_prefix } "\n ' )
276282 envfile .write (f'prepend_path "{ WASI_SDK_ROOT } /bin"\n ' )
277283 envfile .write (f'prepend_path "{ wasm_ghc_prefix } /bin"\n ' )
284+ envfile .write (f'prepend_path "{ PREFIX } /nodejs/bin"\n ' )
278285
279286 for env , value in envs .items ():
280287 envfile .write (f'export { env } ={ value } \n ' )
0 commit comments