zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.12k stars 3.07k forks source link

Compilation error E0793 #7696

Closed hirochirac closed 9 months ago

hirochirac commented 9 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Hello, Can't compile ZED on windows 11. I tried to compile with command cargo build. I received a error message. See below for further information.

Environment

error[E0793]: reference to packed field is unaligned --> C:\Users\b.Le Grin.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: 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 --> c:/[...c]/argo\registry\src\index.crates.io-6f17d22bba15001f\ntapi-0.3.7\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)

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

kazatsuyu commented 9 months ago

This problem is due to an dependency on an old fork of wezterm, which could be solved by making https://github.com/zed-industries/wezterm follow upstream.

SomeoneToIgnore commented 9 months ago

Also, we do not (yet) support Windows in any form, including compiling — there's no CI for that either. So I do not think it's an issue yet — albeit any PRs are welcome to fix the compilation under Windows targets.