Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checksum portability #104

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

aleksa2808
Copy link
Contributor

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 #98.

@johanhelsing
Copy link
Collaborator

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 johanhelsing merged commit 87b5866 into gschup:main Feb 22, 2024
1 check passed
@johanhelsing
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checksums are not portable
3 participants