mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-21 12:41:32 +00:00
Make capstone optional with a feature
This commit is contained in:
@ -13,7 +13,7 @@ smallvec = "0.6.8"
|
|||||||
goblin = "0.0.20"
|
goblin = "0.0.20"
|
||||||
libc = "0.2.49"
|
libc = "0.2.49"
|
||||||
nix = "0.13.0"
|
nix = "0.13.0"
|
||||||
capstone = "0.5.0"
|
capstone = { version = "0.5.0", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
cc = "1.0"
|
cc = "1.0"
|
||||||
@ -25,4 +25,5 @@ semver = "0.9"
|
|||||||
wabt = "0.7.4"
|
wabt = "0.7.4"
|
||||||
|
|
||||||
[features]
|
[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)
|
(func_ptr, ctx, signature, sig_index)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "disasm")]
|
||||||
unsafe fn disass_ptr(ptr: *const u8, size: usize, inst_count: usize) {
|
unsafe fn disass_ptr(ptr: *const u8, size: usize, inst_count: usize) {
|
||||||
use capstone::arch::BuildsCapstone;
|
use capstone::arch::BuildsCapstone;
|
||||||
let mut cs = capstone::Capstone::new() // Call builder-pattern
|
let mut cs = capstone::Capstone::new() // Call builder-pattern
|
||||||
|
Reference in New Issue
Block a user