capstone-rust / capstone-rs

high-level Capstone system bindings for Rust
217 stars 75 forks source link

Support Capstone 4.0 WIP #60

Closed tmfink closed 5 years ago

tmfink commented 5 years ago

Support Capstone 4.0; handle issue #52

codecov[bot] commented 5 years ago

Codecov Report

Merging #60 into master will increase coverage by 73.44%. The diff coverage is 93.23%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #60       +/-   ##
===========================================
+ Coverage   21.08%   94.52%   +73.44%     
===========================================
  Files          80       18       -62     
  Lines       29617     4438    -25179     
===========================================
- Hits         6244     4195     -2049     
+ Misses      23373      243    -23130
Impacted Files Coverage Δ
capstone-rs/src/arch/x86.rs 99.11% <100%> (-0.2%) :arrow_down:
capstone-rs/src/arch/mod.rs 93.98% <100%> (+1.05%) :arrow_up:
capstone-rs/src/instruction.rs 85.59% <100%> (-2.7%) :arrow_down:
capstone-rs/src/capstone.rs 95.47% <100%> (+1.64%) :arrow_up:
capstone-rs/src/error.rs 76.66% <33.33%> (+8.24%) :arrow_up:
capstone-rs/src/constants.rs 79.34% <77.41%> (+15.28%) :arrow_up:
capstone-rs/src/arch/evm.rs 88.46% <88.46%> (ø)
capstone-rs/src/arch/m68k.rs 91.11% <91.11%> (ø)
capstone-rs/src/arch/tms320c64x.rs 91.89% <91.89%> (ø)
capstone-rs/src/arch/m680x.rs 95.75% <95.75%> (ø)
... and 61 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5044ace...e387834. Read the comment docs.

tmfink commented 5 years ago

Even though the i686-pc-windows-gnu and x86_64-pc-windows-gnu tests are failing on AppVeyor, I believe this is a problem with the AppVeyor config.

On Ubuntu 18.04, I was able to build/test for the x86_64-pc-windows-gnu target by:

  1. Installing toolchain/wine: apt-get install g++-mingw-w64-x86-64 wine
  2. Setting ~/.cargo/config:
    [target.x86_64-pc-windows-gnu]
    linker = "x86_64-w64-mingw32-gcc"
    ar = "x86_64-w64-mingw32-gcc-ar"
  3. Build test binaries:
    cargo test --target=x86_64-pc-windows-gnu
        Finished dev [unoptimized + debuginfo] target(s) in 0.12s
         Running target/x86_64-pc-windows-gnu/debug/deps/capstone-e3abe0e98ae3c2a7.exe
    run-detectors: unable to find an interpreter for target/x86_64-pc-windows-gnu/debug/deps/capstone-e3abe0e98ae3c2a7.exe
    error: test failed, to rerun pass '-p capstone --lib'
  4. Run with wine:
    wine target/x86_64-pc-windows-gnu/debug/deps/capstone-e3abe0e98ae3c2a7.exe