Skip to content

Commit 0e7c667

Browse files
authored
Update wasm instructions to match readme.md
1 parent 8259566 commit 0e7c667

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/source/InstallationAndUsage.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ You are now in a position to build the xeus-cpp kernel. You build it by executin
7171
export PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-host
7272
export CMAKE_PREFIX_PATH=$PREFIX
7373
export CMAKE_SYSTEM_PREFIX_PATH=$PREFIX
74-
74+
export SYSROOT_PATH=$HOME/emsdk/upstream/emscripten/cache/sysroot
7575
emcmake cmake \
7676
-DCMAKE_BUILD_TYPE=Release \
7777
-DCMAKE_PREFIX_PATH=$PREFIX \
7878
-DCMAKE_INSTALL_PREFIX=$PREFIX \
7979
-DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \
8080
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
81+
-DSYSROOT_PATH=$SYSROOT_PATH \
8182
..
8283
emmake make install
8384
@@ -90,6 +91,14 @@ To build Jupyter Lite with this kernel without creating a website you can execut
9091
python -m pip install jupyterlite-xeus
9192
jupyter lite build --XeusAddon.prefix=$PREFIX
9293
94+
We now need to shift necessary files like `xcpp.data` which contains the binary representation of the file(s)
95+
we want to include in our application. As of now this would contain all important files like Standard Headers,
96+
Libraries etc coming out of emscripten's sysroot. Assuming we are still inside build we should do the following
97+
98+
.. code-block:: bash
99+
cp $PREFIX/bin/xcpp.data _output/extensions/@jupyterlite/xeus/static
100+
cp $PREFIX/lib/libclangCppInterOp.so _output/extensions/@jupyterlite/xeus/static
101+
93102
Once the Jupyter Lite site has built you can test the website locally by executing
94103

95104
.. code-block:: bash
@@ -104,4 +113,4 @@ If you have conda installed then you can install xeus-cpp using the follwing com
104113
105114
conda install conda-forge::xeus-cpp
106115
107-
Xeus-cpp is available for Linux, MacOS and Windows.
116+
Xeus-cpp is available for Linux, MacOS and Windows.

0 commit comments

Comments
 (0)