capstone-sys 0.8.0

System bindings to the capstone disassembly library
Documentation

capstone-sys

Low-level, unsafe Rust bindings for the Capstone disassembly library.

Crates.io Badge Travis CI Badge

API Documentation

Requirements

  • Rust version >= 1.19
    • We export Rust unions, which were first stabilized with release 1.19
  • One of the following:
    1. A toolchain capable of compiling Capstone (see the make.sh script)
    2. A pre-built version 3.0 Capstone dynamic library (specify the use_system_capstone feature)

Supported Platforms

Platform sys capstone gmake cmake cc
x86_64-apple-darwin X X X X
i686-apple-darwin X* X* X*
x86_64-pc-windows-msvc X
x86_64-pc-windows-gnu X
i686-pc-windows-msvc X*
i686-pc-windows-gnu X*
x86_64-unknown-linux-gnu X X X X
i686-unknown-linux-gnu X* X* X*
x86_64-unknown-freebsd X X X
Symbol Meaning
X build succeeds, all tests pass
X* build succeeds, some bindgen tests fail (issue #18)
build method is not supported

Features

capstone-sys has different features that can be specified in Cargo.toml.

Build Features

These features affect how capstone-sys will use/build the bundled Capstone C library:

  • no feature or gmake (default on non-Windows platforms): build bundled Capstone with GNU make (i.e. gmake).
    • FreeBSD users can install GNU make with pkg install gmake
  • use_system_capstone: use the system Capstone instead of the bundled copy of the Capstone library.
    • Requires that Capstone is already manually installed on the system. We highly recommend that you supply the exact version bundled with capstone-sys.
    • Does not compile Capstone
  • build_capstone_cmake: build the bundled Capstone with cmake (requires CMake to be installed).
  • build_capstone_cc (default on Windows platforms): build the bundled Capstone with the cc Rust crate.

Other Features

  • use_bindgen: instead of using the pre-generated Capstone bindings, dynamically generate bindings with bindgen.

Tested Platforms

The following platforms have automated testing:

  • x86_64-unknown-linux-gnu: Travis CI