Skip to content

Commit c666e9f

Browse files
authored
Create README.md
1 parent 5fb915e commit c666e9f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Scala Native Binding generator
2+
3+
This tool generate Scala Native bindings from C headers. It's build upon clang and Libtooling and thus respect the conventions of clang-tools.
4+
5+
## Usage
6+
7+
Calling the tool is pretty easy, you need to specify the file(s) and the name of the created bindings.
8+
9+
`./scalaBindgen /usr/include/uv.h -name uv --`
10+
11+
Running the previous command wild also yield warnings along with the translation. To keep only the bindings please redirect the output to a file like this:
12+
13+
`./scalaBindgen /usr/include/uv.h -name uv -- > uv.scala`
14+
15+
## Building
16+
17+
Building this tool require building LLVM and Clang. This can take hours. Please consider using pre-built binaries.
18+
19+
* Follow the [building instructions](http://clang.llvm.org/docs/LibASTMatchersTutorial.html#step-0-obtaining-clang) for Clang (Only step 0)
20+
* Go to `llvm/tools/clang/tools/extra`
21+
* Clone this repository `git clone https://github.com/mrRosset/scalaBindgen.git`
22+
* Add `add_subdirectory(scala-bindgen)` to the CMakeLists.txt in the extra folder
23+
* Re-run the llvm/clang compilation
24+

0 commit comments

Comments
 (0)