Skip to content

frgomes/scala-bindgen

Repository files navigation

Overview

Join the chat at https://gitter.im/frgomes/scala-bindgen Build Status

This is work in progress, in early inception phase.

A native binding generator for the Scala Native language.

For the impatient

Install requirements:

$ source requirements.sh

Now you can build and run:

$ sbt clean nativeLink 'bindgen/run test/test001.h'

Usage

$ sbt 'bindgen/run --help'

Supported toolchains

  • Debian Stretch
  • Ubuntu
  • OSX

See: https://github.com/frgomes/scala-bindgen/blob/master/requirements.sh

How it works

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.

  1. scala-bindgen employs Clang (from LLVM infrastructure) for parsing C header files;
  2. Clang builds an AST which represents all sources parsed;
  3. scala-bindgen visits the AST and generates Scala bindings.

At the moment scala-bindgen only generates bindings for C language.

Community

License

scala-bindgen is distributed under the Scala license.

About

A native binding generator for the Scala language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •