capstone-sys
Low-level, unsafe Rust bindings for the Capstone
disassembly library.
Requirements
- Rust version >= 1.19
- We export Rust unions, which were first stabilized with release 1.19
- One of the following:
- A toolchain capable of compiling Capstone (see the
make.sh
script) - A pre-built version 3.0 Capstone dynamic library (specify the
use_system_capstone
feature)
- A toolchain capable of compiling Capstone (see the
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
- FreeBSD users can install GNU make with
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
.- See the
CAPSTONE_REVISION
variable inscripts/update_capstone.sh
to determine the exact Git commit of Capstone.
- See the
- Does not compile Capstone
- Requires that Capstone is already manually installed on the system. We highly recommend that you supply the exact version bundled with
build_capstone_cmake
: build the bundled Capstone withcmake
(requires CMake to be installed).build_capstone_cc
(default on Windows platforms): build the bundled Capstone with thecc
Rust crate.
Other Features
use_bindgen
: instead of using the pre-generated Capstone bindings, dynamically generate bindings withbindgen
.
Tested Platforms
The following platforms have automated testing:
x86_64-unknown-linux-gnu
: Travis CI