magick-rust/docs/Development_Setup.md
Nathan Fiedler e7054d3e35 Use the rust-bindgen crate properly
Using the changes from @gadomski along with some additional work, to get the
generated bindings working again. Works on macOS and FreeBSD 11. A couple of
hacks are needed for FreeBSD, but nothing too serious.

Changed to use the libc prefix, and changed to use the generated enums.

Fixes #22, #15, and #14

cargo test passes
2017-04-08 16:03:58 -07:00

1.4 KiB

Development Setup

Mac OS X

Homebrew is the easiest way to install everything on Mac.

  1. Install Xcode
  2. Install Homebrew
  3. Install Rust and Cargo
  4. Install ImageMagick
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install rust
$ brew install imagemagick@6
$ brew install pkg-config

Then build in the usual manner, as shown in the README.md file (i.e. cargo build and cargo test).

FreeBSD

  1. Install Rust
  2. Install Cargo
  3. Install ImageMagick
  4. Install the Clang libraries

See the FreeBSD fabfile.py for an example of how to install everything. In particular, note that it may be necessary to set LIBCLANG_PATH to the path containing the libclang.so library.

Then build in the usual manner, as shown in the README.md file (i.e. cargo build and cargo test).

Ubuntu Linux

  1. Install Rust and Cargo
  2. Install ImageMagick
  3. Install the Clang libraries

See the Ubuntu fabfile.py for an example of how to install everything. In particular, note that it may be necessary to set LIBCLANG_PATH to the path containing the libclang.so library.

Then build in the usual manner, as shown in the README.md file (i.e. cargo build and cargo test). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (sudo ldconfig).