11Installation And Usage
22-------------------- 
33
4- Installation from source
4+ Installation from source (non wasm build instructions) 
55======================== 
66
77To ensure that the installation works, it is preferable to install `xeus-cpp ` in a
@@ -42,6 +42,68 @@ with a custom installation prefix if need be)
4242    -D CMAKE_INSTALL_LIBDIR=lib 
4343    make &&  make install 
4444
45+ 
46+ ======================== 
47+ 
48+ These instructions will assume you have cmake installed on your system. First clone the repository, and move into that directory
49+ .. code-block :: bash 
50+     git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git 
51+     cd  ./xeus-cpp 
52+ 
53+ 
54+ 
55+ 
56+ .. code-block :: bash 
57+     cd  $HOME  
58+     git clone https://github.com/emscripten-core/emsdk.git 
59+     cd  emsdk 
60+     ./emsdk install 3.1.45 
61+     ./emsdk activate 3.1.45 
62+     source  $HOME /emsdk/emsdk_env.sh 
63+ 
64+ 
65+ 
66+ 
67+ .. code-block :: bash 
68+     micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32 
69+     mkdir build 
70+     pushd  build 
71+     export  PREFIX=$MAMBA_ROOT_PREFIX /envs/xeus-cpp-wasm-host  
72+     export  CMAKE_PREFIX_PATH=$PREFIX  
73+     export  CMAKE_SYSTEM_PREFIX_PATH=$PREFIX  
74+     export  SYSROOT_PATH=$HOME /emsdk/upstream/emscripten/cache/sysroot 
75+     emcmake cmake \ 
76+             -DCMAKE_BUILD_TYPE=Release                        \ 
77+             -DCMAKE_PREFIX_PATH=$PREFIX                        \ 
78+             -DCMAKE_INSTALL_PREFIX=$PREFIX                     \ 
79+             -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON               \ 
80+             -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON            \ 
81+             -DSYSROOT_PATH=$SYSROOT_PATH                       \ 
82+             .. 
83+     emmake make install 
84+ 
85+ 
86+ 
87+ 
88+ .. code-block :: bash 
89+     micromamba create -n xeus-lite-host jupyterlite-core 
90+     micromamba activate xeus-lite-host 
91+     python -m pip install jupyterlite-xeus 
92+     jupyter lite build --XeusAddon.prefix=$PREFIX  
93+ 
94+ 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+ 
102+ 
103+ 
104+ .. code-block :: bash 
105+     jupyter lite serve --XeusAddon.prefix=$PREFIX  
106+ 
45107
46108=========================== 
47109
@@ -51,4 +113,4 @@ If you have conda installed then you can install xeus-cpp using the follwing com
51113
52114    conda install conda-forge::xeus-cpp 
53115
54- 
116+ 
0 commit comments