Skip to content

Commit

Permalink
Update docs with detailings in usage of CppInterOp
Browse files Browse the repository at this point in the history
  • Loading branch information
Krishna-13-cyber committed Aug 12, 2023
1 parent 236b49b commit f32acf0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/UsingCppInterOp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Using CppInterop
C++ Language Interoperability Layer
===================================

Loading Dynamic shared library
==============================

The CppInterop comes with using it is a dynamic shared library,
**libclangCppInterOp.so** which resides in the CppInterOp/build/lib/.

Expand All @@ -20,6 +23,31 @@ classes and members that are being used. The interoperability layer helps us
with the instantiation of templates, diagnostic interaction, creation of
objects, and many more things.

Using LLVM as external library
==============================

In CppInterOp, we are leveraging Clang as a library for interoperability purposes.
To use Clang, we need to pass the Clang configuration to the CMake build system,
so that the build system recognises the configuration and enables usage of Clang
and LLVM.
We can consider clang-repl as a state manager, where CppInterOp allows you to
query the state from the state manager. Thereafter, Cppyy uses this to create
Python objects for C++.

.. code-block:: bash
# Apply the patches for development
compgen -G "../patches/llvm/clang16-*.patch" > /dev/null
&& find ../patches/llvm/clang16-*.patch -printf "%f\n"
&& git apply ../patches/llvm/clang16-*.patch
.. code-block:: bash
# Use the versions of llvm with above patches applied
-DClang_DIR=/usr/lib/llvm-16/build/lib/cmake/clang\
-DLLVM_DIR=/usr/lib/llvm-16/build/lib/cmake/llvm
This section briefly describes all the key **features** offered by
CppInterop. If you are just getting started with CppInterop, then this is the
best place to start.
Expand Down

0 comments on commit f32acf0

Please sign in to comment.