You've already forked ghidra-cli
mirror of
https://github.com/encounter/ghidra-cli.git
synced 2026-03-30 11:12:36 -07:00
1.0 KiB
1.0 KiB
Agent Instructions
Critical Rules
- NEVER SKIP TESTS! If .NET SDK is not installed, the tests MUST fail.
- DEFAULT OUTPUT FORMAT should be human and agent readable, NOT JSON. Use
--jsonand--prettyfor JSON output. - The
detectcommand MUST work without .NET runtime (pure Rust PE parsing).
Architecture
ilspy-cli uses an in-process .NET hosting architecture:
- Rust binary hosts the .NET runtime via
netcorehostcrate - C# bridge DLL wraps ICSharpCode.Decompiler with
[UnmanagedCallersOnly]exports - Data exchange is JSON strings over FFI function pointers
- Memory: C# allocates with
Marshal.AllocHGlobal, Rust callsFreeMemafter reading - Bridge DLL is built at compile time via
build.rs→dotnet publish
Key Capability
Single-method decompilation (ilspy decompile --type T --method M) is NOT possible with ilspycmd. This is a key differentiator.
Build Requirements
- .NET 8 SDK (build time, for
dotnet publish) - .NET 8 runtime (run time, loaded by netcorehost)
- Rust toolchain