| { | ||
| "git": { | ||
| "sha1": "6be06a691c859b3a5243adf774dc71ef68baab25" | ||
| "sha1": "ea78b05f0d603d40fa28855ba271f47494862e9d" | ||
| }, | ||
| "path_in_vcs": "" | ||
| } |
@@ -65,2 +65,3 @@ name: Rust | ||
| command: check | ||
| args: -Z msrv-policy | ||
| - name: test nightly | ||
@@ -171,1 +172,27 @@ uses: actions-rs/cargo@v1 | ||
| args: --target wasm32-unknown-unknown --no-default-features | ||
| msrv: | ||
| name: MSRV | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Install 1.60.0 | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: 1.60.0 | ||
| - name: check | ||
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: check | ||
| no_std: | ||
| name: no-std build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: nightly | ||
| override: true | ||
| - uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: build | ||
| args: --manifest-path=no_std_test/Cargo.toml |
+0
-3
@@ -10,5 +10,2 @@ #![deny(warnings)] | ||
| } | ||
| if let Some(true) = version_check::supports_feature("stdsimd") { | ||
| println!("cargo:rustc-cfg=feature=\"stdsimd\""); | ||
| } | ||
| let arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH was not set"); | ||
@@ -15,0 +12,0 @@ if arch.eq_ignore_ascii_case("x86_64") |
+7
-8
@@ -14,4 +14,5 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| edition = "2018" | ||
| rust-version = "1.60.0" | ||
| name = "ahash" | ||
| version = "0.8.6" | ||
| version = "0.8.7" | ||
| authors = ["Tom Kaitchuck <Tom.Kaitchuck@gmail.com>"] | ||
@@ -96,3 +97,3 @@ build = "./build.rs" | ||
| [dependencies.const-random] | ||
| version = "0.1.12" | ||
| version = "0.1.17" | ||
| optional = true | ||
@@ -109,3 +110,3 @@ | ||
| [dependencies.zerocopy] | ||
| version = "0.7.14" | ||
| version = "0.7.31" | ||
| features = ["simd"] | ||
@@ -155,2 +156,3 @@ default-features = false | ||
| ] | ||
| nightly-arm-aes = [] | ||
| no-rng = [] | ||
@@ -161,7 +163,4 @@ runtime-rng = ["getrandom"] | ||
| [target."cfg(not(all(target_arch = \"arm\", target_os = \"none\")))".dependencies.once_cell] | ||
| version = "1.13.1" | ||
| features = [ | ||
| "unstable", | ||
| "alloc", | ||
| ] | ||
| version = "1.18.0" | ||
| features = ["alloc"] | ||
| default-features = false |
+1
-0
@@ -60,2 +60,3 @@ # aHash    | ||
| If `getrandom` is unavailable and `compile-time-rng` is enabled, aHash will generate random numbers at compile time and embed them in the binary. | ||
| * `nightly-arm-aes`: To use AES instructions on 32-bit ARM, which requires nightly. This is not needed on AArch64. | ||
| This allows for DOS resistance even if there is no random number generator available at runtime (assuming the compiled binary is not public). | ||
@@ -62,0 +63,0 @@ This makes the binary non-deterministic. (If non-determinism is a problem see [constrandom's documentation](https://github.com/tkaitchuck/constrandom#deterministic-builds)) |
| use core::hash::{Hash, Hasher}; | ||
| use std::collections::{HashMap}; | ||
| use std::collections::HashMap; | ||
@@ -67,4 +67,3 @@ fn assert_sufficiently_different(a: u64, b: u64, tolerance: i32) { | ||
| let options: [u32; 11] = [ | ||
| 0x00000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0xF0000000, | ||
| 1, 2, 4, 8, 15 | ||
| 0x00000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0xF0000000, 1, 2, 4, 8, 15, | ||
| ]; | ||
@@ -346,5 +345,8 @@ let mut combinations = Vec::new(); | ||
| for idx_1 in 0..256 { | ||
| for idx_2 in idx_1+1..256 { | ||
| for idx_2 in idx_1 + 1..256 { | ||
| for value_1 in [1, 2, 4, 8, 16, 32, 64, 128] { | ||
| for value_2 in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 17, 18, 20, 24, 31, 32, 33, 48, 64, 96, 127, 128, 129, 192, 254, 255] { | ||
| for value_2 in [ | ||
| 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 17, 18, 20, 24, 31, 32, 33, 48, 64, 96, 127, 128, 129, | ||
| 192, 254, 255, | ||
| ] { | ||
| buf[idx_1] = value_1; | ||
@@ -442,8 +444,4 @@ buf[idx_2] = value_2; | ||
| all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), | ||
| all( | ||
| any(target_arch = "arm", target_arch = "aarch64"), | ||
| any(target_feature = "aes", target_feature = "crypto"), | ||
| not(miri), | ||
| feature = "stdsimd" | ||
| ) | ||
| all(target_arch = "aarch64", target_feature = "aes", not(miri)), | ||
| all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), | ||
| ))] | ||
@@ -450,0 +448,0 @@ #[cfg(test)] |
+8
-8
@@ -16,3 +16,6 @@ //! AHash is a high performance keyed hash function. | ||
| #![cfg_attr( | ||
| all(feature = "std", any(feature = "compile-time-rng", feature = "runtime-rng", feature = "no-rng")), | ||
| all( | ||
| feature = "std", | ||
| any(feature = "compile-time-rng", feature = "runtime-rng", feature = "no-rng") | ||
| ), | ||
| doc = r##" | ||
@@ -99,4 +102,3 @@ # Basic Usage | ||
| #![cfg_attr(feature = "specialize", feature(min_specialization))] | ||
| #![cfg_attr(feature = "specialize", feature(build_hasher_simple_hash_one))] | ||
| #![cfg_attr(feature = "stdsimd", feature(stdsimd))] | ||
| #![cfg_attr(feature = "nightly-arm-aes", feature(stdarch_arm_neon_intrinsics))] | ||
@@ -111,7 +113,5 @@ #[macro_use] | ||
| all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), | ||
| all(any(target_arch = "arm", target_arch = "aarch64"), | ||
| any(target_feature = "aes", target_feature = "crypto"), | ||
| not(miri), | ||
| feature = "stdsimd") | ||
| ))] { | ||
| all(target_arch = "aarch64", target_feature = "aes", not(miri)), | ||
| all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), | ||
| ))] { | ||
| mod aes_hash; | ||
@@ -118,0 +118,0 @@ pub use crate::aes_hash::AHasher; |
+6
-10
@@ -113,7 +113,5 @@ use crate::convert::*; | ||
| #[cfg(all( | ||
| any(target_arch = "arm", target_arch = "aarch64"), | ||
| any(target_feature = "aes", target_feature = "crypto"), | ||
| not(miri), | ||
| feature = "stdsimd" | ||
| #[cfg(any( | ||
| all(target_arch = "aarch64", target_feature = "aes", not(miri)), | ||
| all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), | ||
| ))] | ||
@@ -146,7 +144,5 @@ #[allow(unused)] | ||
| #[cfg(all( | ||
| any(target_arch = "arm", target_arch = "aarch64"), | ||
| any(target_feature = "aes", target_feature = "crypto"), | ||
| not(miri), | ||
| feature = "stdsimd" | ||
| #[cfg(any( | ||
| all(target_arch = "aarch64", target_feature = "aes", not(miri)), | ||
| all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), | ||
| ))] | ||
@@ -153,0 +149,0 @@ #[allow(unused)] |
+10
-11
@@ -5,3 +5,4 @@ use core::hash::Hash; | ||
| all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)), | ||
| all(any(target_arch = "arm", target_arch = "aarch64"), any(target_feature = "aes", target_feature = "crypto"), not(miri), feature = "stdsimd") | ||
| all(target_arch = "aarch64", target_feature = "aes", not(miri)), | ||
| all(feature = "nightly-arm-aes", target_arch = "arm", target_feature = "aes", not(miri)), | ||
| ))] { | ||
@@ -234,3 +235,2 @@ use crate::aes_hash::*; | ||
| impl RandomState { | ||
| /// Create a new `RandomState` `BuildHasher` using random keys. | ||
@@ -322,4 +322,4 @@ /// | ||
| #[cfg_attr( | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| ``` | ||
@@ -336,4 +336,4 @@ use std::hash::BuildHasher; | ||
| #[cfg_attr( | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| ``` | ||
@@ -426,8 +426,7 @@ use std::hash::{BuildHasher, Hash, Hasher}; | ||
| /// Calculates the hash of a single value. This provides a more convenient (and faster) way to obtain a hash: | ||
| /// For example: | ||
| #[cfg_attr( | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| ``` | ||
@@ -444,4 +443,4 @@ use std::hash::BuildHasher; | ||
| #[cfg_attr( | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| feature = "std", | ||
| doc = r##" # Examples | ||
| ``` | ||
@@ -448,0 +447,0 @@ use std::hash::{BuildHasher, Hash, Hasher}; |
+5
-4
@@ -17,7 +17,8 @@ #![cfg_attr(feature = "specialize", feature(build_hasher_simple_hash_one))] | ||
| ), | ||
| all(target_arch = "aarch64", target_feature = "aes", not(miri)), | ||
| all( | ||
| any(target_arch = "arm", target_arch = "aarch64"), | ||
| any(target_feature = "aes", target_feature = "crypto"), | ||
| not(miri), | ||
| feature = "stdsimd", | ||
| feature = "nightly-arm-aes", | ||
| target_arch = "arm", | ||
| target_feature = "aes", | ||
| not(miri) | ||
| ), | ||
@@ -24,0 +25,0 @@ )) { |
Sorry, the diff of this file is not supported yet