SoftbearStudios / kiomet

Kiomet.com real-time strategy game
https://kiomet.com
GNU Affero General Public License v3.0
85 stars 12 forks source link

Error E0793 when running "cargo install --locked trunk --version 0.15.0" #9

Closed bobbyboi64 closed 7 months ago

bobbyboi64 commented 9 months ago
error[E0793]: reference to packed field is unaligned --> C:\Users\takus.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\takus.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)

For more information about this error, try rustc --explain E0793. error: could not compile ntapi (lib) due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: failed to compile trunk v0.15.0, intermediate artifacts can be found at C:\Users\takus\AppData\Local\Temp\cargo-installR0Ewe5

finnbear commented 9 months ago

Which rustc version did you use? If you use the one from the readme, by being in the same directory as you set the override, it has a higher chance of working.

bobbyboi64 commented 9 months ago

rustc 1.71.0-nightly (f5559e338 2023-04-24)

bobbyboi64 commented 9 months ago

Do I install trunk in any directory for in the project directory

bobbyboi64 commented 9 months ago

Also how does the kiomet.com website work because you can right click without triggering the default tab and shortcuts don't work.

finnbear commented 9 months ago

Make sure you install trunk in a directory with that rust version (in general, do whatever our working CI build workflow does). If it doesn't work there, idk what I can do to help, though. trunk is a 3rd party tool. Maybe we could update to the latest version of trunk so it would compile on newer rustc.

Re: right click menu, that's just element.addEventListener('contextmenu', e => e.preventDefault())

bobbyboi64 commented 9 months ago

Is it possible to make a web extension for the game?

finnbear commented 9 months ago

Not sure why we would want to create a browser extension for the game. It's already an installable PWA.

bobbyboi64 commented 9 months ago

is there a way to edit the PWA?

finnbear commented 9 months ago

Please describe what you mean by "edit" and what your goal is, so I can better understand

bobbyboi64 commented 9 months ago

Im trying to look at the code of the game and maybe make an algorithm to play the game

bobbyboi64 commented 9 months ago

But I get the errors with trunk

finnbear commented 9 months ago

Im trying to look at the code of the game and maybe make an algorithm to play the game

Easiest way is for you to modify and compile the game.

But I get the errors with trunk

You could try again in a Linux environment. The error looks potentially Windows-related.

bobbyboi64 commented 9 months ago

Im trying to look at the code of the game and maybe make an algorithm to play the game

Easiest way is for you to modify and compile the game.

But I get the errors with trunk

You could try again in a Linux environment. The error looks potentially Windows-related.

if i recompile im banned from playing on official servers?

bobbyboi64 commented 9 months ago

image

bobbyboi64 commented 9 months ago

why is this

bobbyboi64 commented 9 months ago

image

bobbyboi64 commented 9 months ago

i installed the worng trunk

bobbyboi64 commented 9 months ago

but following the readme.md gives errors for trunk not being a command

bobbyboi64 commented 9 months ago

how did you do this?