Jupyter kernel for the C++ programming language
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 9 年前 | ||
| 10 个月前 | ||
| 3 年前 | ||
| 8 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 8 年前 | ||
| 3 年前 |
xeus-cling 是一款基于 C++ 解释器 cling 和 Jupyter 协议原生实现 xeus 的 C++ Jupyter 内核。
安装
xeus-cling 已打包为 mamba(或 conda)包管理器的软件包,支持 Linux 和 OS X 平台。目前,我们暂未提供 Windows 平台的软件包。
为确保安装顺利,建议在全新环境中安装 xeus-cling。同时,需使用 miniforge 或 miniconda 进行安装,因为使用完整的 anaconda 时,可能会与 anaconda 发行版中已安装的 ZeroMQ 库产生冲突。
使用 mamba 或 conda 安装
最安全的做法是创建一个名为 cling 的环境:
mamba create -n cling
source activate cling
然后您可以在此环境中安装 xeus-cling 及其依赖项
mamba install xeus-cling -c conda-forge
从源代码安装
首先,您需要创建一个新环境并安装依赖项:
mamba create -n xeus-cling -c conda-forge cmake xeus-zmq cling nlohmann_json=3.11.2 cppzmq xtl pugixml doctest cpp-argparse
source activate xeus-cling
如需安装特定版本的软件包,请参考 environment-host.yml。
之后,您可以编译源代码。在构建目录中,运行:
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
如果你尚未安装前端(例如经典 Jupyter Notebook 或 JupyterLab),请先安装一个:
mamba install jupyterlab -c conda-forge
在线试用
若想在网页浏览器中交互式试用 xeus-cling,只需点击下方的 binder 链接:
文档
要开始使用 xeus-cling,请查阅完整文档
http://xeus-cling.readthedocs.io/
使用方法
通过 jupyter notebook 启动 Jupyter 笔记本,然后在“新建”下拉菜单中选择 C++17 内核,即可创建一个新的 C++ 笔记本。
C++ 笔记本
现在,您可以在 Jupyter 笔记本中使用 C++ 编程语言了。

内联帮助与标签补全
使用特殊的 ? 魔法命令,可在分页器上显示快速帮助。

快速帮助内容适用于标准库,也可针对第三方包提供。
富输出渲染

Jupyter 交互式小部件
xwidgets 包中提供了 Jupyter 交互式小部件的 C++ 后端。

依赖项
xeus-cling 依赖于以下组件:
xeus-cling |
xeus-zmq |
xtl |
cling |
pugixml |
cppzmq |
cpp-argparse |
nlohmann_json |
dirent (windows only) |
|---|---|---|---|---|---|---|---|---|
| main | >=1.1.0,<2.0.0 | >=0.7.0,<0.8.0 | >=0.9,<0.10 | ~1.8.1 | ~4.3.0 | ~3.0 | ~3.11.2 | >=2.3.2,❤️ |
| 0.15.3 | >=1.1.0,<2.0.0 | >=0.7.0,<0.8.0 | >=0.9,<0.10 | ~1.8.1 | ~4.3.0 | ~2.9 | >=3.6.1,<4.0 | >=2.3.2,❤️ |
| 0.15.2 | >=1.1.0,<2.0.0 | >=0.7.0,<0.8.0 | >=0.9,<0.10 | ~1.8.1 | ~4.3.0 | ~2.9 | >=3.6.1,<4.0 | >=2.3.2,❤️ |
| 0.15.1 | >=1.0.0,<2.0.0 | >=0.7.0,<0.8.0 | >=0.9,<0.10 | ~1.8.1 | ~4.3.0 | ~2.9 | >=3.6.1,<4.0 | >=2.3.2,❤️ |
| 0.15.0 | >=1.0.0,<2.0.0 | >=0.7.0,<0.8.0 | >=0.9,<0.10 | ~1.8.1 | ~4.3.0 | ~2.9 | >=3.6.1,<4.0 | >=2.3.2,❤️ |
在 0.15 版本之前,xeus-cling 依赖于 cxxopts 而非 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,❤️ |
在 0.14 版本之前,xeus-cling 依赖于 xeus 而非 xeus-zmq:
xeus-cling |
xeus |
xtl |
cling |
pugixml |
cppzmq |
cxxopts |
nlohmann_json |
dirent (windows only) |
|---|---|---|---|---|---|---|---|---|
| 0.13.0 | >=2.0.0,❤️.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,❤️.10 | >=2.3.2,❤️ |
| 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,❤️ |
| 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,❤️ |
xeus-cling 要求其依赖项使用与构建 cling 相同的编译器和相同的 C 运行时进行构建。
贡献指南
请参阅 CONTRIBUTING.md 了解如何贡献代码以及搭建开发环境。
许可证
我们采用共享版权模式,使所有贡献者都能保留其贡献内容的版权。
本软件采用 BSD-3-Clause 许可证授权。详情请参见 LICENSE 文件。