/crystal_lib_gen

Automatic binding generator for Crystal

Primary LanguageCrystal

crystal_lib_gen

Automatic binding generator for Crystal

Install (OSX)

brew install llvm --with-clang
brew link llvm --force
brew install crystal
brew install mruby

bundle install

Install (Ubuntu)

sudo apt install llvm-3.5 libclang3.4-dev ruby2..-dev bundler
bundle install

Usage

# Just an example
bin/crystal-lib-gen path/to/config.rb
# Use another dynamic library name (e.g. libclang-3.4)
# Use this if it can't find clang
FFI_GEN_CLANG=clang-3.4 bin/crystal-lib-gen path/to/config.rb
# Use compatibility mode (disable chdir to script directory, which is enabled by default)
CLG_COMPAT=1 bin/crystal-lib-gen path/to/config.rb

See Also