[go: up one dir, main page]

capstone-sys 0.7.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 system capstone gmake cmake cc
x86_64-apple-darwin :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
i686-apple-darwin :heavy_check_mark:* :x: :heavy_check_mark:* :heavy_check_mark:*
x86_64-pc-windows-msvc :no_entry_sign: :no_entry_sign: :no_entry_sign: :heavy_check_mark:
x86_64-pc-windows-gnu :no_entry_sign: :no_entry_sign: :no_entry_sign: :heavy_check_mark:
i686-pc-windows-msvc :no_entry_sign: :no_entry_sign: :no_entry_sign: :heavy_check_mark:*
i686-pc-windows-gnu :no_entry_sign: :no_entry_sign: :no_entry_sign: :heavy_check_mark:*
x86_64-unknown-linux-gnu :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
i686-unknown-linux-gnu :heavy_check_mark:* :x: :heavy_check_mark:* :heavy_check_mark:*
Symbol Meaning
:heavy_check_mark: build succeeds, all tests pass
:heavy_check_mark:* build succeeds, some bindgen tests fail (issue #18)
:no_entry_sign: build method is not supported/tested
:x: build fails

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.
  • 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