REA 中的 Java vs Rust Ghidra:來自進行中的 Rust 移植的早期基準測試
/u/nanashili 的 Reddit 貼文展示了 rea-rust 的早期基準測試,rea-rust 是 REA 的一個進行中的 Rust 移植,在一個小型 C 程式和一個較大的 Go 目標上,將 TypeScript 版本的 Java Ghidra 後端與原生 Rust Ghidra 後端進行比較。
關於這個案例
作者報告了在一台 M1 Pro Mac 上七次全新工作階段的中位數結果:從啟動到第一個反編譯函式的耗時從 9.43 秒(TypeScript + Java Ghidra)降至 0.39 秒(原生 + Rust Ghidra),分析後的函式請求相當(16 毫秒 vs 15 毫秒),包含子行程在內的取樣峰值記憶體從 1,022 MiB 降至 214 MiB。較大的 Go 測試暴露出一個相容性問題:Java 回傳了所有三個請求的函式,而 Rust 因重複的匯入名稱沒有回傳任何函式;在 C 範例中 Java 輸出更可讀(字串和變數名稱 vs 記憶體位址)。作者指出,這些後端使用不同的 Ghidra 引擎版本與分析實作;來自一台 Mac 和這些目標的結果並不能確立同等的分析品質;Rust 後端使用現有的 ghidra-decompiler crate;開發與基準測試工具均獲得 AI 輔助。文中引用了完整的 Ghidra 報告、指令碼、原始結果和限制,但重現確切測試過的組建仍需要原始本機原始碼快照。貼文最後詢問接下來要測試哪些公開二進位檔和分析任務。
安裝設定
安裝方式請查看原始來源。
原文 / README
I’m working on rea-rust , a Rust port of REA , a local reverse-engineering tool. This is still a work in progress. Compatibility, analysis coverage and output readability are active areas of development. These benchmarks show what worked and where the tested build still needed improvement. I compared the TypeScript version’s Java Ghidra backend with the native version’s Rust Ghidra backend. For a small C program , these were the median results from seven fresh sessions on an M1 Pro Mac: What I measured TypeScript + Java Ghidra Native + Rust Ghidra Start the tool and get the first decompiled function 9.43 seconds 0.39 seconds Request a function after analysis is ready 16 milliseconds 15 milliseconds Sampled peak memory, including child processes 1,022 MiB 214 MiB The biggest improvement was startup. Once analysis was ready, the first decompilation request took about the same time. The larger Go test exposed a compatibility problem. Java returned all three requested functions. Rust returned none because of a duplicate import name. That failure is included in the report. Java also produced more readable output in the C example, showing strings and variable names where Rust sometimes showed memory addresses. These gaps are part of the ongoing work. The backends use different Ghidra engine versions and analysis implementations. Results from one Mac and these targets don’t establish equivalent analysis quality or general performance. The Rust backend uses the existing ghidra-decompiler crate. Development and benchmark tooling were AI-assisted. Full Ghidra report, scripts, raw results and limitations . Reproducing the exact tested builds still requires the original local source snapshots. Which public binaries and analysis tasks would you suggest testing next? submitted by /u/nanashili to r/LovingOpenSourceAI [link] [comments]
