Skip to content

Commit 90ef55f

Browse files
authored
Merge branch 'main' into Remove-lower-bound-on-cppargparse
2 parents 0e42de7 + 53d1686 commit 90ef55f

27 files changed

+545
-100
lines changed

.github/workflows/clang-tidy-review-post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- name: Post review comments
2323
id: post-review
24-
uses: ZedThree/clang-tidy-review/post@v0.20.1
24+
uses: ZedThree/clang-tidy-review/post@v0.21.0
2525
with:
2626
max_comments: 10
2727

.github/workflows/clang-tidy-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
version: "17.0.6"
3131

3232
- name: Run clang-tidy
33-
uses: ZedThree/clang-tidy-review@v0.20.1
33+
uses: ZedThree/clang-tidy-review@v0.21.0
3434
id: review
3535
with:
3636
build_dir: build
@@ -53,4 +53,4 @@ jobs:
5353
cmake . -B build -DCMAKE_C_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang" -DCMAKE_CXX_COMPILER="$GITHUB_WORKSPACE/llvm/bin/clang++" -DCMAKE_EXPORT_COMPILE_COMMANDS=On
5454
5555
- name: Upload artifacts
56-
uses: ZedThree/clang-tidy-review/upload@v0.20.1
56+
uses: ZedThree/clang-tidy-review/upload@v0.21.0

.github/workflows/deploy-github-page.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
-DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \
6262
-DCMAKE_FIND_ROOT_PATH=$PREFIX \
6363
-DSYSROOT_PATH=$SYSROOT_PATH \
64+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
6465
..
6566
emmake make -j ${{ env.ncpus }} install
6667
@@ -74,6 +75,7 @@ jobs:
7475
--XeusAddon.prefix=${{ env.PREFIX }} \
7576
--contents README.md \
7677
--contents notebooks/xeus-cpp-lite-demo.ipynb \
78+
--contents notebooks/smallpt.ipynb \
7779
--contents notebooks/images/marie.png \
7880
--contents notebooks/audio/audio.wav \
7981
--output-dir dist

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ jobs:
244244
-DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \
245245
-DCMAKE_FIND_ROOT_PATH=$PREFIX \
246246
-DSYSROOT_PATH=$SYSROOT_PATH \
247+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
247248
..
248249
emmake make -j ${{ env.ncpus }} install
249250

CMakeLists.txt

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ endif()
9191

9292
set(xeus_REQUIRED_VERSION 5.0.0)
9393
set(xeus_zmq_REQUIRED_VERSION 3.0.0)
94-
set(CppInterOp_REQUIRED_VERSION 1.5.0)
94+
set(CppInterOp_REQUIRED_VERSION 1.7.0)
9595

9696
if (NOT TARGET xeus AND NOT TARGET xeus-static)
9797
find_package(xeus ${xeus_REQUIRED_VERSION} REQUIRED)
@@ -169,17 +169,10 @@ endfunction()
169169

170170
message("Configure kernels: ...")
171171
if(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/")
183176
else()
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.
461446
endif()
462447
# Tests
463448
# =====

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ minutes of past meetings can be found on our
1818
## Setting up a development environment
1919

2020
First, you need to fork the project. After you have done this clone your forked repo. You can do this by
21-
executing the folowing
21+
executing the following
2222

2323
```bash
2424
git clone https://github.com/<your-github-username>/xeus-cpp.git
@@ -35,7 +35,7 @@ micromamba create -f environment-dev.yml -y
3535
micromamba activate xeus-cpp
3636
```
3737

38-
You are now in a position to install xeus-cpp into this envirnoment. You can do this by executing
38+
You are now in a position to install xeus-cpp into this environment. You can do this by executing
3939

4040
```bash
4141
mkdir build
@@ -61,7 +61,7 @@ pytest -sv test_xcpp_kernel.py
6161
## Setting up a development environment (wasm instructions)
6262

6363
First, you need to fork the project. After you have done this clone your forked repo. You can do this by
64-
executing the folowing
64+
executing the following
6565

6666
```bash
6767
git clone https://github.com/<your-github-username>/xeus-cpp.git

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ http://xeus-cpp.readthedocs.io
136136
- [argparse](https://github.com/p-ranav/argparse)
137137
- [CppInterOp](https://github.com/compiler-research/CppInterOp)
138138

139-
## Contributing
140-
141139
See [CONTRIBUTING.md](./CONTRIBUTING.md) to know how to contribute and set up a
142140
development environment.
143141

docs/environment.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ channels:
55

66
dependencies:
77
- breathe
8+
- graphviz
89
- pip:
9-
- sphinx_rtd_theme
10+
- sphinx_rtd_theme

docs/source/InstallationAndUsage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Once the Jupyter Lite site has built you can test the website locally by executi
100100
Installing from conda-forge
101101
===========================
102102

103-
If you have conda installed then you can install xeus-cpp using the follwing command
103+
If you have conda installed then you can install xeus-cpp using the following command
104104

105105
.. code-block:: bash
106106

docs/source/index.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ Introduction
1212
------------
1313

1414
``xeus-cpp`` is a Jupyter kernel for cpp based on the native implementation of
15-
the Jupyter protocol xeus_.
15+
the Jupyter protocol xeus_. Try a Jupyter Lite demo of xeus-cpp by clicking
16+
17+
.. image:: https://jupyterlite.rtfd.io/en/latest/_static/badge.svg
18+
:target: https://compiler-research.github.io/xeus-cpp/lab/index.html
19+
:alt: lite-badge
1620

1721
Licensing
1822
---------
@@ -40,4 +44,4 @@ The Xeus-Cpp is a Jupyter kernel for the C++ programming language
4044
FAQ
4145
reference
4246

43-
.. _xeus: https://github.com/jupyter-xeus/xeus
47+
.. _xeus: https://github.com/jupyter-xeus/xeus

0 commit comments

Comments
 (0)