Skip to content

Commit 5bbc0bf

Browse files
committed
Use Emscripten provided version of Node.js
1 parent d19c6b4 commit 5bbc0bf

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

.ci/scripts/setup-emscripten.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11

22
set -ex
33

4-
install_nodejs() {
5-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
6-
\. "$HOME/.nvm/nvm.sh"
7-
nvm install 22
8-
}
9-
104
install_emscripten() {
115
git clone https://github.com/emscripten-core/emsdk.git
126
pushd emsdk || return
@@ -16,5 +10,4 @@ install_emscripten() {
1610
popd || return
1711
}
1812

19-
install_nodejs
2013
install_emscripten

examples/wasm/README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
This guide describes how to build ExecuTorch for WebAssembly (Wasm).
44

5-
## Directory Structure
6-
7-
```
8-
examples/wasm
9-
└── README.md # This file
10-
```
11-
125
## Prerequisites
136

147
- [emscripten](https://emscripten.org/docs/getting_started/Tutorial.html)
@@ -55,7 +48,7 @@ If you need to rebuild `executor_runner` after modifying the contents of `./mode
5548
cmake --build cmake-out-wasm -j32 --target executor_runner --clean-first
5649
```
5750

58-
4. Run the model with Node.js (automatically installed with Emscripten).
51+
4. Run the model with Node.js. Emscripten should come preinstalled with a compatible version of Node.js. If you have an incompatible version of Node.js installed, you can use the Emscripten-provided version by running `$EMSDK_NODE` instead of `node`.
5952

6053
```bash
6154
# Run the tool on the generated model.

examples/wasm/test_build_wasm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test_build_wasm() {
2323
rm -rf "${model_dir_name}"
2424

2525
echo 'Running wasm build test'
26-
node ${build_dir}/executor_runner.js --model_path="${model_export_name}"
26+
$EMSDK_NODE ${build_dir}/executor_runner.js --model_path="${model_export_name}"
2727
}
2828

2929
if [[ -z $PYTHON_EXECUTABLE ]];

0 commit comments

Comments
 (0)