Open ruihe774 opened 1 month ago
Thanks. Unfortunately offset_of
has only been stabilized in Rust 1.77 and our MSRV is 1.72.
My suggestion: I'm going to branch off and release a new version today and then merge this PR into main
afterwards.
CC: @0xpr03 @JohnTitor
Thanks. Unfortunately
offset_of
has only been stabilized in Rust 1.77 and our MSRV is 1.72. My suggestion: I'm going to branch off and release a new version today and then merge this PR intomain
afterwards.CC: @0xpr03 @JohnTitor
We can hard code the offset giving FILE_NOTIFY_INFORMATION
has a stable ABI; somewhat dirty, though.
In some environments (e.g. wine),
FILE_NOTIFY_INFORMATION
is packed placed and is unaligned. Reading from unalignedFILE_NOTIFY_INFORMATION
is a UB and causes panics in debug builds. This PR workarounds this issue by usingptr::read_unaligned
.