diff --git a/docs/environment-cpp.yml b/docs/environment-cpp.yml new file mode 100644 index 0000000..1aca43c --- /dev/null +++ b/docs/environment-cpp.yml @@ -0,0 +1,6 @@ +name: xeus-cpp-kernel-docs +channels: + - https://repo.mamba.pm/emscripten-forge + - conda-forge +dependencies: + - xeus-cpp diff --git a/docs/index.md b/docs/index.md index bec5d77..13b92c6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -9,11 +9,10 @@ Currently supported kernels are: - [xeus-python](https://github.com/jupyter-xeus/xeus-python) - [xeus-lua](https://github.com/jupyter-xeus/xeus-lua) - [xeus-r](https://github.com/jupyter-xeus/xeus-r) +- [xeus-cpp](https://github.com/compiler-research/xeus-cpp) - [xeus-nelson](https://github.com/jupyter-xeus/xeus-nelson) - [xeus-javascript](https://github.com/jupyter-xeus/xeus-javascript) -We are also working on bringing [xeus-cpp](https://github.com/compiler-research/xeus-cpp) and [xeus-r](https://github.com/jupyter-xeus/xeus-r) into jupyterlite, stay tuned! - Try it here! ::::{tab-set} @@ -71,6 +70,34 @@ Try it here! print(eigen_result$vectors) ``` +::: +:::{tab-item} C++ + +```{eval-rst} +.. replite:: + :kernel: xcpp20 + :height: 600px + + #include + #include + + void funky_sin_wave(int length) { + for (int y = 0; y < 20; y++) { + for (int x = 0; x < length; x++) { + double wave = sin(x * 0.1); + if ((int)(10 + 10 * wave) == y) { + printf("*"); + } else { + printf(" "); + } + } + printf("\n"); + } + } + + funky_sin_wave(80); +``` + ::: :::: diff --git a/docs/jupyter_lite_config.json b/docs/jupyter_lite_config.json index 0d2b8cb..b387853 100644 --- a/docs/jupyter_lite_config.json +++ b/docs/jupyter_lite_config.json @@ -3,7 +3,8 @@ "environment_file": [ "environment-python.yml", "environment-other.yml", - "environment-r.yml" + "environment-r.yml", + "environment-cpp.yml" ] } } diff --git a/ui-tests/environment.yml b/ui-tests/environment.yml index 79ea852..709db9e 100644 --- a/ui-tests/environment.yml +++ b/ui-tests/environment.yml @@ -6,5 +6,6 @@ dependencies: - xeus-python - xeus-lua - xeus-r + - xeus-cpp - pandas - bqplot diff --git a/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-crossoriginisolated-linux.png b/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-crossoriginisolated-linux.png index 62ea338..6329e7b 100644 Binary files a/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-crossoriginisolated-linux.png and b/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-crossoriginisolated-linux.png differ diff --git a/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-default-linux.png b/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-default-linux.png index 76a5264..6329e7b 100644 Binary files a/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-default-linux.png and b/ui-tests/tests/jupyterlite_xeus.spec.ts-snapshots/jupyter-xeus-launcher-default-linux.png differ