decomp-0.1.2 has been yanked.
Visit the last successful build:
decomp-0.1.4
Components of a decompilation pipeline.
This library is a Rust reimplementation of The decomp project.
The original decomp project is licensed under The Unlicense. In an effort to keep this resource accessible, this library is also licensed under The Unlicense.
Getting Started:
Add decomp
as a dependency to your Cargo.toml
.
Make sure to replace the version and llvm version with valid versions.
[]
= { = "X.X.X", = [ "llvm-X" ] }
Load an LLVM Module:
use *;
// From a textual LLVM IR file.
let module = from_ir_path.unwrap;
// From a bitcode LLVM IR file.
let module = from_bc_path.unwrap;
Generate a Control Flow Graph:
See cfg
.
use *;
for function in &module.functions
Analyse the Control Flow Graph:
See cfa
.
use *;
for function in &module.functions
Recover Control Flow Groups:
See cfr
.
use *;
for function in &module.functions