Skip to content

Commit 11392fb

Browse files
authored
Fix wasm build instructions (#230)
1 parent ef9d57d commit 11392fb

File tree

3 files changed

+27
-33
lines changed

3 files changed

+27
-33
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,21 @@ git clone https://github.com/<your-github-username>/xeus-cpp.git
6868
cd ./xeus-cpp
6969
```
7070

71-
You'll now want to make sure you're using emsdk version "3.1.45" and activate it. You can get this by executing the following
71+
You'll now want to make sure you are using the same emsdk as the rest of our dependencies. This can be achieved by executing
72+
the following
7273
```bash
73-
cd $HOME
74-
git clone https://github.com/emscripten-core/emsdk.git
75-
cd emsdk
76-
./emsdk install 3.1.45
77-
./emsdk activate 3.1.45
78-
source $HOME/emsdk/emsdk_env.sh
74+
micromamba create -f environment-wasm-build.yml -y
75+
micromamba activate xeus-cpp-wasm-build
7976
```
8077

8178
You are now in a position to build the xeus-cpp kernel. You build it by executing the following
8279
```bash
8380
micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32
8481
mkdir build
85-
pushd build
86-
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
87-
export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot
82+
cd build
83+
export BUILD_TOOLS_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build
84+
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
85+
export SYSROOT_PATH=$BUILD_TOOLS_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot
8886

8987
emcmake cmake \
9088
-DCMAKE_BUILD_TYPE=Release \
@@ -98,7 +96,7 @@ emmake make install
9896

9997
To build Jupyter Lite with this kernel without creating a website you can execute the following
10098
```bash
101-
micromamba create -n xeus-lite-host jupyterlite-core
99+
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
102100
micromamba activate xeus-lite-host
103101
python -m pip install jupyterlite-xeus
104102
jupyter lite build --XeusAddon.prefix=$PREFIX

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,21 @@ git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
6969
cd ./xeus-cpp
7070
```
7171

72-
You'll now want to make sure you're using emsdk version "3.1.45" and activate it. You can get this by executing the following
72+
You'll now want to make sure you are using the same emsdk as the rest of our dependencies. This can be achieved by executing
73+
the following
7374
```bash
74-
cd $HOME
75-
git clone https://github.com/emscripten-core/emsdk.git
76-
cd emsdk
77-
./emsdk install 3.1.45
78-
./emsdk activate 3.1.45
79-
source $HOME/emsdk/emsdk_env.sh
75+
micromamba create -f environment-wasm-build.yml -y
76+
micromamba activate xeus-cpp-wasm-build
8077
```
8178

8279
You are now in a position to build the xeus-cpp kernel. You build it by executing the following
8380
```bash
8481
micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32
8582
mkdir build
86-
pushd build
87-
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
88-
export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot
83+
cd build
84+
export BUILD_TOOLS_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build
85+
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
86+
export SYSROOT_PATH=$BUILD_TOOLS_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot
8987

9088
emcmake cmake \
9189
-DCMAKE_BUILD_TYPE=Release \
@@ -99,7 +97,7 @@ emmake make install
9997

10098
To build Jupyter Lite with this kernel without creating a website you can execute the following
10199
```bash
102-
micromamba create -n xeus-lite-host jupyterlite-core
100+
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
103101
micromamba activate xeus-lite-host
104102
python -m pip install jupyterlite-xeus
105103
jupyter lite build --XeusAddon.prefix=$PREFIX

docs/source/InstallationAndUsage.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,25 @@ These instructions will assume you have cmake installed on your system. First cl
5353
cd ./xeus-cpp
5454
5555
56-
You'll now want to make sure you're using emsdk version "3.1.45" and activate it. You can get this by executing the following
56+
You'll now want to make sure you are using the same emsdk as the rest of our dependencies. This can be achieved by executing
57+
the following
5758

5859
.. code-block:: bash
5960
60-
cd $HOME
61-
git clone https://github.com/emscripten-core/emsdk.git
62-
cd emsdk
63-
./emsdk install 3.1.45
64-
./emsdk activate 3.1.45
65-
source $HOME/emsdk/emsdk_env.sh
6661
62+
micromamba create -f environment-wasm-build.yml -y
63+
micromamba activate xeus-cpp-wasm-build
6764
6865
You are now in a position to build the xeus-cpp kernel. You build it by executing the following
6966

7067
.. code-block:: bash
7168
7269
micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32
7370
mkdir build
74-
pushd build
75-
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
76-
export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot
71+
cd build
72+
export BUILD_TOOLS_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build
73+
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
74+
export SYSROOT_PATH=$BUILD_TOOLS_PREFIX/opt/emsdk/upstream/emscripten/cache/sysroot
7775
emcmake cmake \
7876
-DCMAKE_BUILD_TYPE=Release \
7977
-DCMAKE_INSTALL_PREFIX=$PREFIX \
@@ -88,7 +86,7 @@ To build Jupyter Lite with this kernel without creating a website you can execut
8886

8987
.. code-block:: bash
9088
91-
micromamba create -n xeus-lite-host jupyterlite-core
89+
micromamba create -n xeus-lite-host jupyterlite-core -c conda-forge
9290
micromamba activate xeus-lite-host
9391
python -m pip install jupyterlite-xeus
9492
jupyter lite build --XeusAddon.prefix=$PREFIX

0 commit comments

Comments
 (0)