gschup / bevy_ggrs

Bevy plugin for the GGRS P2P rollback networking library.
Other
302 stars 41 forks source link

Fix checksum portability #104

Closed aleksa2808 closed 8 months ago

aleksa2808 commented 8 months ago

This PR fixes checksum portability across different architectures by:

  1. Replacing the usage of usize with u64 in places where these numbers were hashed.
  2. Switching the hasher implementation from the Bevy-provided, non-portable AHash hasher to the portable seahash hasher.

Fixes https://github.com/gschup/bevy_ggrs/issues/98.

johanhelsing commented 8 months ago

Thanks! If someone wants to add a test for this, we could perhaps look into using the insta for snapshot testing of bevy_ggrs snapshot checksum values, and run test on two different architectures.

johanhelsing commented 8 months ago

Or just hardcode the checksum value in the test I guess, they're not that long...