ogxd / gxhash

The fastest hashing algorithm 📈
https://docs.rs/gxhash
MIT License
767 stars 26 forks source link

Try using generics instead of forcing one platform at compile time #33

Closed ogxd closed 9 months ago

xxaier commented 10 months ago

I try run cargo bench --bench hashset --features=s256 but get error

   Compiling gxhash v2.2.4 (/root/git/gxhash)
error[E0432]: unresolved import `s128`
 --> src/gxhash/s128/mod.rs:9:9
  |
9 | pub use s128::*;
  |         ^^^^ help: a similar path exists: `crate::s128`
  |
  = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>

error[E0433]: failed to resolve: could not find `s256` in the crate root
  --> src/gxhash/mod.rs:49:37
   |
49 |     pub type AdapterWidest = crate::s256::Adapter256;
   |                                     ^^^^ could not find `s256` in the crate root

error[E0412]: cannot find type `Adapter128` in this scope
  --> src/gxhash/s128/mod.rs:13:31
   |
13 |     crate::gxhash::gxhash32::<Adapter128>(input, seed)
   |                               ^^^^^^^^^^ not found in this scope
   |
help: you might be missing a type parameter
   |
12 | pub fn gxhash32<Adapter128>(input: &[u8], seed: i64) -> u32 {
   |                ++++++++++++

error[E0412]: cannot find type `Adapter128` in this scope
  --> src/gxhash/s128/mod.rs:18:31
   |
18 |     crate::gxhash::gxhash64::<Adapter128>(input, seed)
   |                               ^^^^^^^^^^ not found in this scope