{"id":13418812,"url":"https://github.com/jupyter-xeus/xeus","last_synced_at":"2025-04-07T23:12:33.375Z","repository":{"id":37559711,"uuid":"75825736","full_name":"jupyter-xeus/xeus","owner":"jupyter-xeus","description":"Implementation of the Jupyter kernel protocol in C++","archived":false,"fork":false,"pushed_at":"2024-07-02T12:51:34.000Z","size":9775,"stargazers_count":891,"open_issues_count":14,"forks_count":84,"subscribers_count":29,"default_branch":"main","last_synced_at":"2024-08-05T02:01:18.449Z","etag":null,"topics":["c-plus-plus","interpreter","jupyter","jupyter-kernels"],"latest_commit_sha":null,"homepage":"https://xeus.readthedocs.io/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jupyter-xeus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-07T10:35:53.000Z","updated_at":"2024-08-05T02:01:26.198Z","dependencies_parsed_at":"2023-02-01T10:00:48.372Z","dependency_job_id":"53a2c5a0-9de2-4b1c-b363-24390adda17e","html_url":"https://github.com/jupyter-xeus/xeus","commit_stats":{"total_commits":448,"total_committers":20,"mean_commits":22.4,"dds":0.5066964285714286,"last_synced_commit":"d425913127f43955e6e8f9eddd6f838856198951"},"previous_names":["quantstack/xeus"],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter-xeus%2Fxeus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter-xeus%2Fxeus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter-xeus%2Fxeus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jupyter-xeus%2Fxeus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jupyter-xeus","download_url":"https://codeload.github.com/jupyter-xeus/xeus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744335,"owners_count":20988783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","interpreter","jupyter","jupyter-kernels"],"created_at":"2024-07-30T22:01:07.423Z","updated_at":"2025-04-07T23:12:33.355Z","avatar_url":"https://github.com/jupyter-xeus.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings","C++","others"],"sub_categories":[],"readme":"# ![xeus](docs/source/xeus.svg)\n[![GithubActions](https://github.com/jupyter-xeus/xeus/actions/workflows/main.yml/badge.svg)](https://github.com/jupyter-xeus/xeus/actions/workflows/main.yml)\n[![Documentation Status](http://readthedocs.org/projects/xeus/badge/?version=latest)](https://xeus.readthedocs.io/en/latest/?badge=latest)\n[![Join the Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/QuantStack/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nC++ implementation of the Jupyter Kernel protocol\n\n## Introduction\n\n`xeus` is a library meant to facilitate the implementation of kernels for Jupyter. It takes the\nburden of implementing the Jupyter Kernel protocol so developers can focus on implementing the\ninterpreter part of the kernel.\n\nSeveral Jupyter kernels are built upon xeus, such as [`xeus-cling`](https://github.com/jupyter-xeus/xeus-cling),\na kernel for the C++ programming language, and [`xeus-python`](https://github.com/jupyter-xeus/xeus-python), an alternative Python kernel for Jupyter.\n\n## Installation\n\n`xeus` has been packaged on all platforms for the mamba (or conda) package manager.\n\n```\nmamba install xeus -c conda-forge\n```\n\n## Documentation\n\nTo get started with using `xeus`, check out the full documentation\n\nhttp://xeus.readthedocs.io/\n\n## Usage\n\n`xeus` enables custom kernel authors to implement Jupyter kernels more easily. It takes the burden of implementing the Jupyter Kernel protocol so developers can focus on implementing the interpreter part of the Kernel.\n\nThe easiest way to get started with a new kernel is to inherit from the base interpreter class `xeus::xinterpreter` and implement the private virtual methods:\n\n- `configure_impl`\n- `execute_request_impl`\n- `complete_request_impl`\n- `inspect_request_impl`\n- `is_complete_request_impl`\n- `kernel_info_request_impl`\n- `shutdown_request_impl`\n\nas seen in the [documentation](http://xeus.readthedocs.io/).\n\n\n```cpp\n#include \"xeus/xinterpreter.hpp\"\n\n#include \"nlohmann/json.hpp\"\n\nusing xeus::xinterpreter;\n\nnamespace nl = nlohmann;\n\nnamespace custom\n{\n    class custom_interpreter : public xinterpreter\n    {\n    public:\n\n        custom_interpreter() = default;\n        virtual ~custom_interpreter() = default;\n\n    private:\n\n        void configure_impl() override;\n\n        void execute_request_impl(send_reply_callback cb,\n                                  int execution_counter,\n                                  const std::string\u0026 code,\n                                  execute_request_config config,\n                                  nl::json user_expressions) override;\n\n        nl::json complete_request_impl(const std::string\u0026 code,\n                                       int cursor_pos) override;\n\n        nl::json inspect_request_impl(const std::string\u0026 code,\n                                      int cursor_pos,\n                                      int detail_level) override;\n\n        nl::json is_complete_request_impl(const std::string\u0026 code) override;\n\n        nl::json kernel_info_request_impl() override;\n\n        void shutdown_request_impl() override;\n    };\n}\n```\n\nKernel authors can then rebind to the native APIs of the interpreter that is being interfaced, providing richer information than with the classical approach of a wrapper kernel capturing textual output.\n\n## Building from Source\n\n`xeus` depends on [`nlohmann_json`](https://github.com/nlohmann/json).\n\n|  xeus   | nlohmann json |\n|---------|---------------|\n| master  |    ^3.11.0    |\n| 5.x     |    ^3.11.0    |\n\nVersions prior to version 5 depend on the following libraries: [`nlohmann_json`](https://github.com/nlohmann/json) and [`xtl`](https://github.com/xtensor-stack/xtl).\n\n|  xeus   |   xtl          | nlohmann json |\n|---------|----------------|---------------|\n| master  | \u003e=0.7.0,\u003c0.8.0 |    ^3.11.0    |\n| 4.x     | \u003e=0.7.0,\u003c0.8.0 |    ^3.11.0    |\n| 3.x     | \u003e=0.7.0,\u003c0.8.0 |    ^3.2.0     |\n\nVersions prior to version 3 also depend on the following libraries: [`ZeroMQ`](https://github.com/zeromq/libzmq),\n[`cppzmq`](https://github.com/zeromq/cppzmq), and [`OpenSSL`](https://github.com/openssl/openssl).\n\n\n|  xeus   | ZeroMQ  | cppzmq  |   xtl          | nlohmann json | OpenSSL |\n|---------|---------|---------|----------------|---------------|---------|\n| 2.4.1   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.4.0   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.3.1   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.3.0   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.2.0   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.1.1   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.1.0   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 2.0.0   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 1.0.4   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 1.0.3   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 1.0.2   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 1.0.1   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n| 1.0.0   |  ^4.2.5 |  ^4.7.1 | \u003e=0.7.0,\u003c0.8.0 |      ^3.2.0   |  ^1.0.1 |\n\nOn Linux platforms, `xeus` also requires `libuuid`, which is available in all linux distributions (`uuid-dev` on Debian).\n\nWe have packaged all these dependencies on conda-forge. The simplest way to install them is to run:\n\n```bash\nmamba install cmake pkg-config xtl nlohmann_json -c conda-forge\n```\n\nOn Linux platforms, you will also need `libuuid`:\n\n```bash\nmamba install libuuid -c conda-forge\n```\n\nOnce you have installed the dependencies, you can build and install `xeus`.\nFrom the `build` directory, run:\n\n```bash\ncmake -D CMAKE_BUILD_TYPE=Release ..\nmake\nmake install\n```\n\n## Installing the Dependencies from Source\n\nThe dependencies can also be installed from source. Simply clone the directories and run the following cmake (cmake \u003e= 3.8)  and make instructions.\n\n### ZeroMQ\n\n[ZeroMQ](https://github.com/zeromq/libzmq) is the messaging library underlying the Jupyter kernel protocol.\n\n```bash\ncmake -D WITH_PERF_TOOL=OFF -D ZMQ_BUILD_TESTS=OFF -D ENABLE_CPACK=OFF\n-D CMAKE_BUILD_TYPE=Release\nmake\nmake install\n```\n\n## OpenSSL\n\n[OpenSSL](https://www.openssl.org/) is packaged for most package managers (apt-get, rpm, mamba).\nWe recommend making use of an off-the-shelf build of OpenSSL for your system.\n\nFor more information on building OpenSSL, check out the official [OpenSSL wiki](https://wiki.openssl.org/index.php/Compilation_and_Installation).\n\n### cppzmq\n\n[cppzmq](https://github.com/zeromq/cppzmq) is a header only library:\n\n```bash\ncmake -D CMAKE_BUILD_TYPE=Release\nmake install\n```\n\n### json for modern cpp\n\n[nlohmann_json](https://github.com/nlohmann/json) is a header only library\n\n```bash\ncmake\nmake install\n```\n\n### xtl\n\n[xtl](https://github.com/xtensor-stack/xtl) is a header only library:\n\n```bash\ncmake -D CMAKE_BUILD_TYPE\nmake install\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) to know how to contribute and set up a development environment.\n\n## License\n\nWe use a shared copyright model that enables all contributors to maintain the\ncopyright on their contributions.\n\nThis software is licensed under the BSD-3-Clause license. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupyter-xeus%2Fxeus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjupyter-xeus%2Fxeus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupyter-xeus%2Fxeus/lists"}