Compare commits

...

1 commit

Author SHA1 Message Date
Emil Ernerfeldt
46279dbd09 ahash: replace runtime-rng with compile-time-rng
https://github.com/emilk/egui/issues/2009
2022-09-07 16:27:27 +02:00
5 changed files with 47 additions and 8 deletions

48
Cargo.lock generated
View file

@ -63,7 +63,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57e6e951cfbb2db8de1828d49073a113a29fd7117b1596caa781a258c7e38d72"
dependencies = [
"cfg-if",
"getrandom",
"const-random",
"once_cell",
"serde",
"version_check",
@ -694,6 +694,28 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "const-random"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4"
dependencies = [
"const-random-macro",
"proc-macro-hack",
]
[[package]]
name = "const-random-macro"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40"
dependencies = [
"getrandom",
"lazy_static",
"proc-macro-hack",
"tiny-keccak",
]
[[package]]
name = "copyless"
version = "0.1.5"
@ -866,6 +888,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "crunchy"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
[[package]]
name = "csv"
version = "1.1.6"
@ -1182,7 +1210,6 @@ dependencies = [
"egui-wgpu",
"egui-winit",
"egui_glow",
"getrandom",
"glow",
"glutin",
"js-sys",
@ -1706,10 +1733,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
dependencies = [
"cfg-if",
"js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasm-bindgen",
]
[[package]]
@ -2835,6 +2860,12 @@ dependencies = [
"toml",
]
[[package]]
name = "proc-macro-hack"
version = "0.5.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
[[package]]
name = "proc-macro2"
version = "1.0.43"
@ -3725,6 +3756,15 @@ dependencies = [
"num_threads",
]
[[package]]
name = "tiny-keccak"
version = "2.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237"
dependencies = [
"crunchy",
]
[[package]]
name = "tiny-skia"
version = "0.6.6"

View file

@ -94,7 +94,6 @@ directories-next = { version = "2", optional = true }
# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
bytemuck = "1.7"
getrandom = { version = "0.2", features = ["js"] } # used by ahash
js-sys = "0.3"
percent-encoding = "2.1"
wasm-bindgen = "0.2"

View file

@ -57,7 +57,7 @@ serde = ["dep:serde", "epaint/serde"]
[dependencies]
epaint = { version = "0.19.0", path = "../epaint", default-features = false }
ahash = "0.8"
ahash = { version = "0.8", default-features = false, features = ["compile-time-rng", "std"] }
nohash-hasher = "0.2"
#! ### Optional dependencies

View file

@ -44,7 +44,7 @@ egui = { version = "0.19.0", path = "../egui", default-features = false, feature
] }
egui-winit = { version = "0.19.0", path = "../egui-winit", default-features = false }
ahash = "0.8"
ahash = { version = "0.8", default-features = false, features = ["compile-time-rng", "std"] }
bytemuck = "1.7"
glium = "0.32"

View file

@ -56,7 +56,7 @@ serde = ["dep:serde", "ahash/serde", "emath/serde"]
emath = { version = "0.19.0", path = "../emath" }
ab_glyph = "0.2.11"
ahash = "0.8"
ahash = { version = "0.8", default-features = false, features = ["compile-time-rng", "std"] }
nohash-hasher = "0.2"
#! ### Optional dependencies