Closed oberrich closed 1 year ago
I wouldn't have minded implementing the encoder interface as well but I barely know any Rust 🤣 All ffi definitions should now be updated to reflect the latest API changes.
Thanks, that's some good progress!
I have also removed the ZydisDecodingFlags as I can't find a single code reference in neither the C code nor the Rust code and assume it has been removed again (rel: https://github.com/zyantific/zydis/pull/406)
Yes -- they were temporarily part of the ZydisDecoderDecodeFull
interface but got removed before the v4.0 final because we found the interface to be too bloated.
The only thing I have to wonder about is why I can't find a single reference to MAX_OPERAND_COUNT_VISIBLE inside the C code anymore, yet the rust bindings are still using it for the formatter. Is this intended or is further work needed?
This is coincidental -- ZYDIS_MAX_OPERAND_COUNT_VISIBLE
is a supported way to ask the decoder to only write visible operands -- the examples in the C code just don't use it right now.
This PR
generated.rs
rustfmt
doesn't like, I guess because ofreorder_impl_items
)ffi/formater.rs
C-bindings and invocations to new APIffi/encoder.rs
C-bindings to new APII have manually reviewed and compared everything inside
ffi/decoder.rs
,ffi/utils.rs
, as well asenums.rs
(modulo the formatter token stuff) against the C definitions. @athre0z The only thing I have to wonder about is why I can't find a single reference toMAX_OPERAND_COUNT_VISIBLE
inside the C code anymore, yet the rust bindings are still using it for the formatter. Is this intended or is further work needed?I have also removed the
ZydisDecodingFlags
as I can't find a single code reference in neither the C code nor the Rust code and assume it has been removed again (rel: https://github.com/zyantific/zydis/pull/406)