• Stars
    star
    2,682
  • Rank 17,027 (Top 0.4 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Jupyter kernel for the C++ programming language

xeus-cling

Azure Pipelines Appveyor Documentation Status Binder Join the Gitter Chat

xeus-cling is a Jupyter kernel for C++ based on the C++ interpreter cling and the native implementation of the Jupyter protocol xeus.

Installation

xeus-cling has been packaged for the mamba (or conda) package manager on the Linux and OS X platforms. At the moment, we are not providing packages for the Windows platform.

To ensure that the installation works, it is preferable to install xeus-cling in a fresh environment. It is also needed to use a miniforge or miniconda installation because with the full anaconda you may have a conflict with the ZeroMQ library which is already installed in the anaconda distribution.

Installation with mamba or conda

The safest usage is to create an environment named cling:

mamba create -n cling
source activate cling

Then you can install in this environment xeus-cling and its dependencies

mamba install xeus-cling -c conda-forge

Installation from source

You will first need to create a new environment and install the dependencies:

mamba create -n xeus-cling -c conda-forge cmake xeus-zmq cling nlohmann_json cppzmq xtl pugixml doctest cpp-argparse
source activate xeus-cling

Please refer to environment-host.yml for packages specific versions to install if applicable.

You can then compile the sources. From the build directory, run:

cmake -D CMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -D CMAKE_C_COMPILER=$CC -D CMAKE_CXX_COMPILER=$CXX -D CMAKE_INSTALL_LIBDIR=${CONDA_PREFIX}/lib ..
make && make install

If you don't have a frontend already installed (classic Jupyter Notebook or JupyterLab for instance), install one:

mamba install jupyterlab -c conda-forge

Trying it online

To try out xeus-cling interactively in your web browser, just click on the binder link:

Binder

Documentation

To get started with using xeus-cling, check out the full documentation

http://xeus-cling.readthedocs.io/

Usage

Launch the jupyter notebook with jupyter notebook and launch a new C++ notebook by selecting the C++17 kernel in the new dropdown.

A C++ notebook

You can now make use of the C++ programming language in the Jupyter notebook.

A C++ notebook

Inline help and tab-completion

Quick help is shown on the pager with the special ? magic.

Help

Content for the quick help is available for the standard library, and can be made available for third-party packages.

Rendering of rich outputs

Rich output

Jupyter interactive widgets

A C++ backend for the Jupyter interactive widgets is available in the xwidgets package.

Widgets

Dependencies

xeus-cling depends on

xeus-cling xeus-zmq xtl cling pugixml cppzmq cpp-argparse nlohmann_json dirent (windows only)
main >=1.0.0,<2.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 ~2.9 >=3.6.1,<4.0 >=2.3.2,<3
0.15.1 >=1.0.0,<2.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 ~2.9 >=3.6.1,<4.0 >=2.3.2,<3
0.15.0 >=1.0.0,<2.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 ~2.9 >=3.6.1,<4.0 >=2.3.2,<3

Prior to version 0.15, xeus-cling was depending on cxxopts instead of cpp-argparse.

xeus-cling xeus-zmq xtl cling pugixml cppzmq cxxopts nlohmann_json dirent (windows only)
0.14.0 >=1.0.0,<2.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 >=2.1.1,<=2.2 >=3.6.1,<4.0 >=2.3.2,<3

Prior to version 0.14, xeus-cling was depending on xeus instead of xeus-zmq:

xeus-cling xeus xtl cling pugixml cppzmq cxxopts nlohmann_json dirent (windows only)
0.13.0 >=2.0.0,<3.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 >=2.1.1,<=2.2 >=3.6.1,<3.10 >=2.3.2,<3
0.12.1 >=1.0.0,<2.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 >=2.1.1,<=2.2 >=3.6.1,<4.0 >=2.3.2,<3
0.12.0 >=1.0.0,<2.0.0 >=0.7.0,<0.8.0 >=0.6,<0.9 ~1.8.1 ~4.3.0 >=2.1.1,<=2.2 >=3.6.1,<4.0 >=2.3.2,<3

xeus-cling requires its dependencies to be built with the same compiler and same C runtime as the one used to build cling.

Contributing

See CONTRIBUTING.md to know how to contribute and set up a development environment.

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.

More Repositories

1

xeus

Implementation of the Jupyter kernel protocol in C++
C++
838
star
2

cpp-terminal

C++ library for writing multiplatform terminal applications
C++
447
star
3

xeus-python

Jupyter kernel for the Python programming language
C++
431
star
4

xeus-sqlite

Jupyter kernel for SQLite
C++
156
star
5

xeus-sql

Jupyter kernel for SQL databases
C++
148
star
6

xwidgets

C++ backend for Jupyter interactive widgets
C++
131
star
7

xleaflet

C++ backend for the jupyter leaflet widget
C++
77
star
8

xeus-octave

Jupyter kernel for GNU Octave
Jupyter Notebook
57
star
9

xeus-lua

Jupyter kernel for the Lua programming language
C++
40
star
10

xproperty

Traitlets-like C++ properties and implementation of the observer pattern
C++
36
star
11

xeus-robot

Jupyter kernel for Robot Framework
Jupyter Notebook
30
star
12

xeus-calc

Jupyter kernel for a simple calculator
C++
17
star
13

xeus-python-wheel

Building a PyPI wheel for xeus-python
CMake
12
star
14

xena

The world needs Xena, stay tuned!
CMake
8
star
15

xeus-nelson

Jupyter kernel for Nelson
C++
7
star
16

xeus-cookiecutter

Cookiecutter for xeus-based Jupyter kernels
CMake
5
star
17

xhale

Converter from sphinx and breathe inventory files to doxygen tag files
Python
5
star
18

xeus-qt

ZeroMQ-based middleware for xeus integrated in the Qt event loop
CMake
5
star
19

xeus-wren

Jupyter kernel for the Wren programming language
C++
5
star
20

xeus-zmq

ZeroMQ-based middleware for xeus
C++
5
star
21

xcanvas

C++ back-end for ipycanvas
C++
5
star
22

robotframework-interpreter

Utilities for building a Robot Framework interpreter
Python
3
star
23

xvega-bindings

xvega bindings for xeus
C++
3
star
24

xeus-lite

Emscripten-based middleware for xeus
C++
2
star
25

xeus-python-shell

Core Python code for xeus-python
Python
2
star