I was trying to install elf2uf2-rs on windows and ran the command cargo install elf2uf2-rs and there was a error
Compiling assert_into v1.1.0===> ] 64/79: pbr, regex, termcolor, regex-syntax, ntapi, aho-corasick, serial...
error[E0793]: reference to packed field is unalignedr, regex, regex-syntax, ntapi, aho-corasick, serialport, syn
--> C:\Users\yatin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ntapi-0.3.7\src\ntexapi.rs:2783:52
|
2783 | *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and 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
--> C:\Users\yatin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ntapi-0.3.7\src\ntexapi.rs:2807:25
|
2807 | ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: fields of packed structs are not properly aligned, and 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)
Compiling zerocopy-derive v0.3.2
For more information about this error, try `rustc --explain E0793`.opy-derive, regex-syntax, ntapi, aho-corasick, ...
error: could not compile `ntapi` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `elf2uf2-rs v1.3.7`
I was trying to install elf2uf2-rs on windows and ran the command
cargo install elf2uf2-rs
and there was a error