Cling - The Interactive C++ Interpreter
Go to file
Vassil Vassilev 8069aa7a73 Handle llvm::Errors correctly.
This fixes several tests on osx.
2023-12-05 14:14:03 +01:00
.github Fixed argument nomenclature [skip-ci] (#10936) 2022-07-15 11:59:07 +02:00
cmake/modules CMake: use CLING_BINARY_DIR instead of LLVM_BINARY_DIR to configure ClingConfig.cmake 2023-08-08 08:44:08 +02:00
demo Remove trailing spaces 2014-08-13 16:08:36 +02:00
docs Improve the documentation to align better to the cling repository. 2022-11-19 08:44:03 +01:00
include/cling Simplify std::tuple/pair value printer 2023-10-18 06:59:05 +02:00
lib Handle llvm::Errors correctly. 2023-12-05 14:14:03 +01:00
patches Remove patch for clang::CompoundStmt::replaceStmts 2021-04-23 09:29:06 +02:00
test Handle variable templates in DeclUnloader 2023-11-30 09:29:02 +01:00
tools Remove usage of --src-root with llvm-config 2023-08-02 10:59:04 +02:00
www Prepare for releasing cling v0.9 2021-05-04 14:59:05 +02:00
.clang-format Do not allow single line if statements. 2019-05-31 11:29:15 +02:00
.gitignore Add a gitignore 2019-12-23 06:44:27 +01:00
.travis.yml Fixed argument nomenclature [skip-ci] (#10936) 2022-07-15 11:59:07 +02:00
appveyor.yml Appveyor: Build with Ninja on Windows. 2017-03-09 08:29:28 +01:00
CMakeLists.txt increase minimal version requirement to 3.5, call before project 2023-08-17 17:44:07 +02:00
CREDITS.txt Update CREDITS.txt 2022-02-22 17:59:04 +01:00
LastKnownGoodLLVMSVNRevision.txt Complete the upgrade to LLVM/Clang 13 for cling. 2022-12-09 08:44:19 +01:00
LICENSE.TXT Remove trailing spaces 2014-08-13 16:08:36 +02:00
README.md README: use githack.com CDN url (NFC). 2022-01-11 18:14:03 +01:00
VERSION Bump cling version to 1.0~dev. 2021-05-05 08:14:03 +02:00

Cling - The Interactive C++ Interpreter

The main repository is at https://github.com/root-project/cling

Overview

Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure. Cling realizes the read-eval-print loop (REPL) concept, in order to leverage rapid application development. Implemented as a small extension to LLVM and Clang, the interpreter reuses their strengths such as the praised concise and expressive compiler diagnostics.

See also cling's web page.

Please note that some of the resources are rather old and most of the stated limitations are outdated.

Installation

Release Notes

See our release notes to find what's new.

Binaries

Our nightly binary snapshots can be found here.

Building from Source with Cling Packaging Tool

Cling's tree has a user-friendly, command-line utility written in Python called Cling Packaging Tool (CPT) which can build Cling from source and generate installer bundles for a wide range of platforms. CPT requires Python 3 or later.

If you have Cling's source cloned locally, you can find the tool in tools/packaging directory. Alternatively, you can download the script manually, or by using wget:

wget https://raw.githubusercontent.com/root-project/cling/master/tools/packaging/cpt.py
chmod +x cpt.py
./cpt.py --check-requirements && ./cpt.py --create-dev-env Debug --with-workdir=./cling-build/

Full documentation of CPT can be found in tools/packaging.

Usage

./cling '#include <stdio.h>' 'printf("Hello World!\n")'

To get started run:

./cling --help

or type

./cling
[cling]$ .help

Jupyter

Cling comes with a Jupyter kernel. After building cling, install Jupyter and cling's kernel by following the README.md in tools/Jupyter. Make sure cling is in your PATH when you start jupyter!

Citing Cling

% Peer-Reviewed Publication
%
% 19th International Conference on Computing in High Energy and Nuclear Physics (CHEP)
% 21-25 May, 2012, New York, USA
%
@inproceedings{Cling,
  author = {Vassilev,V. and Canal,Ph. and Naumann,A. and Moneta,L. and Russo,P.},
  title = {{Cling} -- The New Interactive Interpreter for {ROOT} 6}},
  journal = {Journal of Physics: Conference Series},
  year = 2012,
  month = {dec},
  volume = {396},
  number = {5},
  pages = {052071},
  doi = {10.1088/1742-6596/396/5/052071},
  url = {https://iopscience.iop.org/article/10.1088/1742-6596/396/5/052071/pdf},
  publisher = {{IOP} Publishing}
}

Developers' Corner

Cling's latest doxygen documentation

Contributions

Every contribution is considered a donation and its copyright and any other related rights become exclusive ownership of the person who merged the code or in any other case the main developers of the "Cling Project".

We warmly welcome external contributions to the Cling! By providing code, you agree to transfer your copyright on the code to the "Cling project". Of course you will be duly credited and your name will appear on the contributors page, the release notes, and in the CREDITS file shipped with every binary and source distribution. The copyright transfer is necessary for us to be able to effectively defend the project in case of litigation.

License

Please see our LICENSE.

Releases

Our release steps to follow when cutting a new release:

  1. Update release notes
  2. Remove ~dev suffix from VERSION
  3. Add a new entry in the news section of our website
  4. Commit the changes.
  5. git tag -a v0.x -m "Tagging release v0.x"
  6. Tag cling-patches of clang.git: git tag -a cling-v0.x -m "Tagging clang for cling v0.x"
  7. Create a draft release in github and copy the contents of the release notes.
  8. Wait for green builds.
  9. Upload binaries to github (Travis should do this automatically).
  10. Publish the tag and announce it on the mailing list.
  11. Increment the current version and append ~dev.