This is work in progress, in early inception phase.
A native binding generator for the Scala Native language.
Install requirements:
$ source requirements.sh
Now you can build and run:
$ sbt clean nativeLink 'bindgen/run test/test001.h'
$ sbt 'bindgen/run --help'
- Debian Stretch
- Ubuntu
- OSX
See: https://github.com/frgomes/scala-bindgen/blob/master/requirements.sh
In a nutshell, scala-bindgen
lays on the shoulders of the giant Clang compiler (from LLVM infrastructure)
for achieving the task of transforming C
header files into Scala
bindings.
For examples on how Scala
bindings look like, please see stdlib.scala.
scala-bindgen
employsClang
(from LLVM infrastructure) for parsingC
header files;Clang
builds an AST which represents all sources parsed;scala-bindgen
visits the AST and generates Scala bindings.
At the moment scala-bindgen
only generates bindings for C
language.
- Have a question? Ask it on Stack Overflow with tag scala-bindgen.
- Want to chat? Join our Gitter chat channel.
- Found a bug or want to propose a new feature? Open an issue on Github.
scala-bindgen
is distributed under the Scala license.