kytan
kytan copied to clipboard
The latest version is corrupt on Windows11
The latest version of kytan depends on the v0.7 mio library. However, v0.7 mio on Windows11 relies on version 0.3 of ntapi, which according to my tests no longer compiles (To be precise, it is version v0.3.7).
- This is part of the
Cargo.tomlfor thev0.7.14version ofmio.
[target.'cfg(windows)'.dependencies]
miow = "0.3.6"
winapi = { version = "0.3", features = ["winsock2", "mswsock", "mstcpip"] }
ntapi = "0.3"
- This is the error message when compiling the
0.3version ofntapi.
error[E0793]: reference to packed field is unaligned
--> src\ntexapi.rs:2783:52
|
2783 | *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
error[E0793]: reference to packed field is unaligned
--> src\ntexapi.rs:2807:25
|
2807 | ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
= note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
= help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
For more information about this error, try `rustc --explain E0793`.
error: could not compile `ntapi` (lib) due to 2 previous errors
Finally, I've included information about the toolchain and platform:
- OS:
Windows 11 Professional Insider Preview x86_64 - Kernel:
10.0.23619 - Rust Toolchain:
stable-x86_64-pc-windows-msvc- version:
rustc 1.75.0 (82e1608df 2023-12-21)
- version: