-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'ea78b05f0d603d40fa28855ba271f47494862e9d' into release-0.8
- Loading branch information
Showing
11 changed files
with
158 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "ahash" | ||
version = "0.8.6" | ||
version = "0.8.7" | ||
authors = ["Tom Kaitchuck <[email protected]>"] | ||
license = "MIT OR Apache-2.0" | ||
description = "A non-cryptographic hash function using AES-NI for high performance" | ||
|
@@ -12,6 +12,7 @@ edition = "2018" | |
readme = "README.md" | ||
build = "./build.rs" | ||
exclude = ["/smhasher", "/benchmark_tools"] | ||
rust-version = "1.60.0" | ||
|
||
[lib] | ||
name = "ahash" | ||
|
@@ -43,6 +44,9 @@ no-rng = [] | |
# in case this is being used on an architecture lacking core::sync::atomic::AtomicUsize and friends | ||
atomic-polyfill = [ "dep:atomic-polyfill", "once_cell/atomic-polyfill"] | ||
|
||
# Nightly-only support for AES intrinsics on 32-bit ARM | ||
nightly-arm-aes = [] | ||
|
||
[[bench]] | ||
name = "ahash" | ||
path = "tests/bench.rs" | ||
|
@@ -75,15 +79,15 @@ codegen-units = 1 | |
version_check = "0.9.4" | ||
|
||
[dependencies] | ||
const-random = { version = "0.1.12", optional = true } | ||
const-random = { version = "0.1.17", optional = true } | ||
serde = { version = "1.0.117", optional = true } | ||
cfg-if = "1.0" | ||
atomic-polyfill = { version="1.0.1", optional=true} | ||
getrandom = { version = "0.2.7", optional = true } | ||
zerocopy = { version = "0.7.14", default-features = false, features = ["simd"] } | ||
zerocopy = { version = "0.7.31", default-features = false, features = ["simd"] } | ||
|
||
[target.'cfg(not(all(target_arch = "arm", target_os = "none")))'.dependencies] | ||
once_cell = { version = "1.13.1", default-features = false, features = ["unstable", "alloc"] } | ||
once_cell = { version = "1.18.0", default-features = false, features = ["alloc"] } | ||
|
||
[dev-dependencies] | ||
no-panic = "0.1.10" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[workspace] | ||
|
||
[package] | ||
name = "no_std_test" | ||
version = "0.1.0" | ||
edition = "2018" | ||
authors = ["Stephen Chung"] | ||
description = "no-std test application" | ||
|
||
[dependencies] | ||
ahash = { path = "../", default_features = false } | ||
wee_alloc = { version = "0.4.5", default_features = false } | ||
|
||
[profile.dev] | ||
panic = "abort" | ||
|
||
[profile.release] | ||
opt-level = "z" # optimize for size | ||
debug = false | ||
rpath = false | ||
debug-assertions = false | ||
codegen-units = 1 | ||
panic = "abort" | ||
|
||
[profile.unix] | ||
inherits = "release" | ||
lto = true | ||
|
||
[profile.windows] | ||
inherits = "release" | ||
|
||
[profile.macos] | ||
inherits = "release" | ||
lto = "fat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
//! This is a bare-bones `no-std` application that hashes a value and | ||
//! uses the hash value as the return value. | ||
#![no_std] | ||
#![feature(alloc_error_handler, start, core_intrinsics, lang_items, link_cfg)] | ||
|
||
#[global_allocator] | ||
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT; | ||
|
||
use core::hash::{Hash, Hasher}; | ||
|
||
// NB: Rust needs a CRT runtime on Windows MSVC. | ||
#[cfg(all(windows, target_env = "msvc"))] | ||
#[link(name = "msvcrt")] | ||
#[link(name = "libcmt")] | ||
extern "C" {} | ||
|
||
#[start] | ||
fn main(_argc: isize, _argv: *const *const u8) -> isize { | ||
let mut h: ahash::AHasher = Default::default(); | ||
42_i32.hash(&mut h); | ||
return h.finish() as isize; | ||
} | ||
|
||
|
||
#[alloc_error_handler] | ||
fn foo(_: core::alloc::Layout) -> ! { | ||
core::intrinsics::abort(); | ||
} | ||
|
||
#[panic_handler] | ||
#[lang = "panic_impl"] | ||
fn rust_begin_panic(_: &core::panic::PanicInfo) -> ! { | ||
core::intrinsics::abort(); | ||
} | ||
|
||
#[no_mangle] | ||
extern "C" fn _rust_eh_personality() {} | ||
|
||
#[no_mangle] | ||
extern "C" fn rust_eh_personality() {} | ||
|
||
#[no_mangle] | ||
extern "C" fn rust_eh_register_frames() {} | ||
|
||
#[no_mangle] | ||
extern "C" fn rust_eh_unregister_frames() {} | ||
|
||
#[no_mangle] | ||
extern "C" fn _Unwind_Resume() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters