Crates.io | decomp |
lib.rs | decomp |
version | |
source | src |
created_at | 2024-10-23 01:06:17.995297 |
updated_at | 2024-10-31 02:58:11.641914 |
description | Components of a decompilation pipeline. |
homepage | |
repository | https://github.com/Totobird-Creations/decomp-rs |
max_upload_size | |
id | 1419514 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.
Add decomp
as a dependency to your Cargo.toml
.
Make sure to replace the version and llvm version with valid versions.
[dependencies]
decomp = { version = "X.X.X", features = [ "llvm-X" ] }
use decomp::prelude::*;
// From a textual LLVM IR file.
let module = Module::from_ir_path("/path/to/file.ll").unwrap();
// From a bitcode LLVM IR file.
let module = Module::from_bc_path("/path/to/file.bc").unwrap();
See cfg
.
use decomp::prelude::*;
for function in &module.functions {
let cfg = ControlFlowGraph::new(function);
println!("{}", cfg);
}
See cfa
.
use decomp::prelude::*;
for function in &module.functions {
let cfg = ControlFlowGraph::new(function);
let prims = CFAPrim::find_all(cfg).unwrap();
println!("{}", prims);
}
See cfr
.
use decomp::prelude::*;
for function in &module.functions {
let cfg = ControlFlowGraph::new(function);
let prims = CFAPrim::find_all(cfg).unwrap();
let groups = CFRGroups::new(&prims).unwrap();
println!("{}", groups);
}