mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 08:10:49 +00:00
Make capstone optional with a feature
This commit is contained in:
parent
aae256b407
commit
c07298e58e
@ -13,7 +13,7 @@ smallvec = "0.6.8"
|
||||
goblin = "0.0.20"
|
||||
libc = "0.2.49"
|
||||
nix = "0.13.0"
|
||||
capstone = "0.5.0"
|
||||
capstone = { version = "0.5.0", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0"
|
||||
@ -25,4 +25,5 @@ semver = "0.9"
|
||||
wabt = "0.7.4"
|
||||
|
||||
[features]
|
||||
debug = ["wasmer-runtime-core/debug"]
|
||||
debug = ["wasmer-runtime-core/debug"]
|
||||
disasm = ["capstone"]
|
@ -462,6 +462,7 @@ fn get_func_from_index<'a>(
|
||||
(func_ptr, ctx, signature, sig_index)
|
||||
}
|
||||
|
||||
#[cfg(feature = "disasm")]
|
||||
unsafe fn disass_ptr(ptr: *const u8, size: usize, inst_count: usize) {
|
||||
use capstone::arch::BuildsCapstone;
|
||||
let mut cs = capstone::Capstone::new() // Call builder-pattern
|
||||
|
Loading…
x
Reference in New Issue
Block a user