Automatic binding generator for native libraries in Crystal
Crystal C Makefile
Switch branches/tags
Nothing to show
Clone or download
ysbaddaden Merge pull request #52 from olbat/add-crystal0.25+-support
* Fix: update TravisCI's testing environments
* Fix: Crystal 0.25+ compatibility
* Fix: guess enum type from it's members
* Allow to specify the path to the llvm-config tool using an env. var.
* Fix: add clang's builtin includes to clang arguments
Latest commit 1122d5a Jul 19, 2018

README.md

crystal_lib Build Status

Automatic binding generator for native libraries in Crystal.

NOTE: THIS PROJECT IS EXPERIMENTAL. WHILE IT'S PROVING USEFUL FOR A WIDE RANGE OF LIBRARIES, THERE ARE STILL SEVERAL CORNER CASES THAT WILL NOT TRANSLATE PROPERLY.

This will eventually be integrated into the compiler itself so you don't have to manually generate these bindings and copy & paste them into your project. The advantage of this is that some types and values vary depending on the platform, so generating these as late as possible is the best thing to do.

Status

For now you can use this as a tool to generate bindings from a lib declaration. Check the examples directory.

Usage

crystal src/main.cr -- examples/lib_git2.cr

This will write the generate lib definition to standard output.