Skip to content

Commit 555b8f5

Browse files
authored
Initial README.md (#16)
1 parent 29276b9 commit 555b8f5

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Description
2+
3+
The clang-bind is a project to generate python bindings for C++ code using clang python bindings and pybind11.
4+
5+
# Dependencies
6+
7+
**C++**
8+
9+
*libclang*
10+
11+
```
12+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
13+
echo 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main' | sudo tee -a /etc/apt/sources.list
14+
echo 'deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main' | sudo tee -a /etc/apt/sources.list
15+
sudo apt-get update
16+
sudo apt-get install -y libclang-11-dev python3-clang-11
17+
```
18+
19+
**Python**
20+
21+
`pip install -r requirements.txt`
22+
23+
# Demonstration
24+
25+
1. Go to `clang-bind/bindings/python/tests/test_project/` folder
26+
2. Create a build folder
27+
3. Run `cmake ..`
28+
4. Run `make -j$(nproc)`
29+
5. Run `python ../../scripts/parse.py --com ./ ../src/simple.cpp`
30+
6. Run `python ../../scripts/generate.py --com json/src/simple.json`
31+
32+
The binding code will be available in `pybind11-gen/src` folder.
33+

requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Mako==1.1.3
2+
requests==2.24.0
3+
conan==1.31.0
4+
pybind11==2.6.0
5+
black==20.8b1
6+
pytest==6.1.2
7+
cmake==3.18.2

0 commit comments

Comments
 (0)