Build breaks on 32bit systems: cannot find value `SEED` in this scope
error[E0425]: cannot find value `SEED` in this scope
--> sudachi/src/util/fxhash.rs:78:25
|
78 | impl_hash_word!(usize = SEED, u32 = SEED32, u64 = SEED64);
| ^^^^ not found in this scope
|
note: constant `crate::hash::SEED` exists but is inaccessible
--> sudachi/src/hash.rs:20:1
|
20 | const SEED: u64 = 0x16f11fe89b0d677cu64;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not accessible
FreeBSD
It seems the SEED definition is missing for 32bit systems. https://github.com/WorksApplications/sudachi.rs/blob/8e087242c00f4a6f773c0043ef20e91b12f0e9b8/sudachi/src/util/fxhash.rs#L54-L59
@eiennohito Is it safe to use this hash for 32bit systems?
The hash function itself should work, but for 32-bit compatibility all usize usages should be checked.
The other painful thing is memory mapping of dictionaries which will be a problem in a 32-bit environment as the dictionary is pretty large and mmap can fail simply because of lack of the address space (there is only 2GB available for userspace). Also testing for 32-bit architectures can have its own cans of worms as CI mostly contain only 64 bit OS without 32-bit libraries and 32-bit userspace on 64-bit system does not have that much virtual memory pressure problem as native 32-bit environment has.