Skip to content

Add contents for CppInterOp Documentation #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

Krishna-13-cyber
Copy link
Contributor

No description provided.

@Krishna-13-cyber Krishna-13-cyber marked this pull request as draft July 3, 2023 16:32

cd ../
export LLVM_DIR=$PWD
cd ../

Clone the InterOp repo. Build it using cling and install. Note down the path to InterOp install directory. This will be referred to as INTEROP_DIR:
Clone the InterOp repo. Build it using cling and install. Note down the path to InterOp install directory. This will be referred to as INTEROP_DIR:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you break at 80 cols?

@@ -51,11 +51,11 @@ Build Clang-Repl:
.. code-block:: text


Get the llvm/release/16.x version:
// Get the llvm/release/16.x version:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems to be bash, shell where the token for comments is #.

If you are just getting started with CppInterop, then this is the best place to start.
You may want to skim some sections on the first read.
This section briefly describes all the key functionalities offered by
CppInterop.If you are just getting started with CppInterop, then this is the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CppInterop.If you are just getting started with CppInterop, then this is the
CppInterOp. If you are just getting started with CppInterop, then this is the

You may want to skim some sections on the first read.
This section briefly describes all the key functionalities offered by
CppInterop.If you are just getting started with CppInterop, then this is the
best place to start.You may want to skim some sections on the first read.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
best place to start.You may want to skim some sections on the first read.
best place to start. You may want to skim some sections on the first read.


C++ Language Interoperability Layer
===================================

The CppInterop comes with using it is a dynamic shared library,
**libclangInterOp.so.13** which resides in the CppInterOp/build/lib/.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**libclangInterOp.so.13** which resides in the CppInterOp/build/lib/.
**libclangInterOp.so** which resides in the CppInterOp/build/lib/.


libInterop = ctypes.CDLL("./libInterOp.so")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that the name of the library?

@@ -1,5 +1,39 @@
Reference
---------
----------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why an extra dash here?


**Note:: This example library shown below is portrayal of the concept on which
Copy link
Contributor

@vgvassilev vgvassilev Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Note:: This example library shown below is portrayal of the concept on which
**Note:: This example library shown below is to illustrate the concept on which

@@ -1,5 +1,153 @@
Tutorials
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wlav, could you take a look and give feedback on our documentation intent to capture the cppyy/python interop use case as motivation for CppInterOp?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? What specific piece of text needs commenting?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wlav, basically this file: docs/tutorials.rst. I'd like to make sure we are not making some unreasonable claim.

_cpp_compile = libInterop.Clang_Parse
_cpp_compile.argtypes = [ctypes.c_char_p]

We are using ctypes for inducting our library, *Clang_Parse* which is part
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are Clang_Parse and such defined? Should we not show how the header file looks like at least?

# We are using ctypes for inducting our library, *Clang_Parse* which is part
# of the library is being used for parsing the C++ code.

.. code-block:: bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. code-block:: bash
.. code-block:: cpp

Then replace # with //

is parsed by the CppInterOp library in previous snippet and further compilation
goes on.

.. code-block:: cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that’s python.

wrapped. In the similar manner we can use get_namespace.

.. code-block::cpp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise.

@Krishna-13-cyber Krishna-13-cyber marked this pull request as ready for review July 26, 2023 12:24
@@ -1,5 +1,185 @@
Tutorials
----------
This tutorial emphasizes on the abilities and usage of CppInterOp, Let's get
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This tutorial emphasizes on the abilities and usage of CppInterOp, Let's get
This tutorial emphasizes on the abilities and usage of CppInterOp. Let's get

Can you please reread very carefully the entire set of documentation. I do not expect to continue fixing such details as it seems that we have not paid enough attention at that point. Please make sure it does not have any obvious issues before asking for a review.

@vgvassilev vgvassilev marked this pull request as draft July 29, 2023 03:25
@vgvassilev
Copy link
Contributor

Can you squash all commits into one and mark this ready to review. I can improve a few things after we land it.

@vgvassilev vgvassilev marked this pull request as ready for review August 1, 2023 22:19
@vgvassilev vgvassilev added this pull request to the merge queue Aug 1, 2023
Merged via the queue into compiler-research:main with commit 0d4ab93 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants