From d8331b2f75b4a71a27565efef61d2767ee92fe59 Mon Sep 17 00:00:00 2001 From: Sam Samai Date: Thu, 29 Oct 2020 21:22:11 +1100 Subject: [PATCH 1/2] Downgrade ahash for wasm build --- Cargo.lock | 27 +++------------------------ egui/Cargo.toml | 9 +++++++-- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f02f990d18..96e04dcf4df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,13 +23,9 @@ checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" [[package]] name = "ahash" -version = "0.5.6" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2deff5792519f5985c9cdd5a0399df3ca3419114841d282bae646acadbf0a99" -dependencies = [ - "getrandom", - "lazy_static", -] +checksum = "f6789e291be47ace86a60303502173d84af8327e3627ecf334356ee0f87a164c" [[package]] name = "andrew" @@ -620,17 +616,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -[[package]] -name = "getrandom" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "gimli" version = "0.22.0" @@ -1504,7 +1489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", - "wasi 0.10.0+wasi-snapshot-preview1", + "wasi", "winapi 0.3.9", ] @@ -1562,12 +1547,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.10.0+wasi-snapshot-preview1" diff --git a/egui/Cargo.toml b/egui/Cargo.toml index 0ae2aa96efd..f9dba0d1c98 100644 --- a/egui/Cargo.toml +++ b/egui/Cargo.toml @@ -10,12 +10,17 @@ readme = "../README.md" repository = "https://github.com/emilk/egui" categories = ["gui", "graphics"] keywords = ["gui", "imgui", "immediate", "portable", "gamedev"] -include = [ "**/*.rs", "Cargo.toml", "fonts/ProggyClean.ttf", "fonts/Comfortaa-Regular.ttf"] +include = [ + "**/*.rs", + "Cargo.toml", + "fonts/ProggyClean.ttf", + "fonts/Comfortaa-Regular.ttf", +] [lib] [dependencies] -ahash = { version = "0.5", features = ["std"], default-features = false } +ahash = { version = "0.4", features = ["std"], default-features = false } parking_lot = "0.11" rusttype = "0.9" serde = { version = "1", features = ["derive"], optional = true } From f0bbf9de27608c4a3b67816e0498e77e8fa7518b Mon Sep 17 00:00:00 2001 From: Sam Samai Date: Thu, 29 Oct 2020 21:47:05 +1100 Subject: [PATCH 2/2] Make a note about why we need to hold back the ahash version --- egui/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/egui/Cargo.toml b/egui/Cargo.toml index f9dba0d1c98..07e42758f05 100644 --- a/egui/Cargo.toml +++ b/egui/Cargo.toml @@ -20,6 +20,7 @@ include = [ [lib] [dependencies] +# ahash 0.5 breaks ./build_web.sh, keep at 0.4, more info https://github.com/emilk/egui/pull/35 ahash = { version = "0.4", features = ["std"], default-features = false } parking_lot = "0.11" rusttype = "0.9"