@@ -91,7 +91,7 @@ endif()
9191
9292set (xeus_REQUIRED_VERSION 5.0.0)
9393set (xeus_zmq_REQUIRED_VERSION 3.0.0)
94- set (CppInterOp_REQUIRED_VERSION 1.5 .0)
94+ set (CppInterOp_REQUIRED_VERSION 1.7 .0)
9595
9696if  (NOT  TARGET  xeus AND  NOT  TARGET  xeus-static )
9797    find_package (xeus ${xeus_REQUIRED_VERSION}  REQUIRED)
@@ -169,17 +169,10 @@ endfunction()
169169
170170message ("Configure kernels: ..." )
171171if (EMSCRIPTEN)
172-     # TODO: Currently jupyterlite-xeus and xeus-lite do not provide 
173-     # methods to fetch information from the arguments present in the 
174-     # generated emscripten kernel. 
175-     # The following needs to be done here : 
176-     # 1) We need to configure the kernel properly 
177-     #    Check issue https://github.com/compiler-research/xeus-cpp/issues/185. 
178-     # 2) Once the above is done we need to add support in jupyterlite-xeus & xeus-lite 
179-     #    to be able to deal with arguments present in kernel.json 
180-     # 3) Finally we should fetch the C++ version from the kernel.json file and 
181-     #    be able to pass it to our wasm interpreter rather than forcing a version. 
172+     set (XEUS_CPP_RESOURCE_DIR "/lib/clang/${CPPINTEROP_LLVM_VERSION_MAJOR} " )
173+     configure_wasm_kernel("/share/jupyter/kernels/xcpp17/" )
182174    configure_wasm_kernel("/share/jupyter/kernels/xcpp20/" )
175+     configure_wasm_kernel("/share/jupyter/kernels/xcpp23/" )
183176else ()
184177    configure_native_kernel("/share/jupyter/kernels/xcpp17/" )
185178    configure_native_kernel("/share/jupyter/kernels/xcpp20/" )
@@ -443,21 +436,13 @@ if(EMSCRIPTEN)
443436    xeus_wasm_compile_options(xcpp)
444437    xeus_wasm_link_options(xcpp "web,worker" )
445438    target_link_options (xcpp
439+         PUBLIC  "SHELL: -s USE_SDL=2" 
446440        PUBLIC  "SHELL: --preload-file ${SYSROOT_PATH} /include@/include" 
441+         PUBLIC  "SHELL: --preload-file ${CMAKE_INSTALL_PREFIX}${XEUS_CPP_RESOURCE_DIR} @${XEUS_CPP_RESOURCE_DIR} " 
447442        PUBLIC  "SHELL: --preload-file ${XEUS_CPP_DATA_DIR} @/share/xeus-cpp" 
448443        PUBLIC  "SHELL: --preload-file ${XEUS_CPP_CONF_DIR} @/etc/xeus-cpp" 
449444        PUBLIC  "SHELL: --post-js ${CMAKE_CURRENT_SOURCE_DIR} /wasm_patches/post.js" 
450445    )
451-     # TODO: Emscripten supports preloading files just once before it generates 
452-     # the xcpp.data file (containing the binary representation of the file(s) we 
453-     # want to include in our application). 
454-     # Hence although we are adding support for Standard Headers, Libraries etc 
455-     # through emscripten's sysroot for now, we need to do the following: 
456-     # 1) Enable CppInterOp to provide us with a resource dir. 
457-     # 2) If the above cannot be done, we can use the resource dir provided 
458-     #    by llvm on emscripten-forge but would involve adding a dependency. 
459-     # 3) Shift the resource dir and the sysroot to a common location. 
460-     # 4) Preload everything required together. 
461446endif ()
462447# Tests 
463448# ===== 
0 commit comments