I noticed that in the last few releases of IDA, there’s been mention in the release notes of a “Rust ABI”
- IDA 9.4 Release Notes > Higher Level Language Support, which mentions a new
CM_CC_RUSTcalling convention. However, I couldn’t find a description of how this calling convention works. - IDA 9.5 Release Notes > Rust ABI on ARM[64]/MIPS/PPC/RISC-V, which mentions the
CM_CC_RUSTcalling convention, and also a__rustlabel that functions can be labelled with, to indicate that they use the Rust ABI.
However, I couldn’t find a description in the IDA docs of how this calling convention works. I am curious about it, as I would like to evaluate using IDA for reversing Rust binaries. Also, as far as I understand it, the primary issue with Rust binaries is that Rust to Rust code doesn’t have a stable ABI, and the current implementation of the ABI in the Rust compiler isn’t really documented or guaranteed. This is in contrast to Go, which has an ABI that is technically unstable, but which is versioned and documented (i.e. if ABIInternal ever changes, they will freeze the current implementation of ABIInternal and call it something different, as they did with ABI0).
What is the definition of the CM_CC_RUST / __rust calling convention right now? Thanks in advance.