From 48e466b66d4ef74d81fb06865b7f9ed92a0e6af6 Mon Sep 17 00:00:00 2001 From: sdasda7777 <17746796+sdasda7777@users.noreply.github.com> Date: Fri, 24 Nov 2023 21:05:42 +0100 Subject: [PATCH] Added WASM target to Cargo.toml --- Cargo.toml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 9886607..68d059a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,10 +3,26 @@ name = "minesweeper6d" version = "0.1.2" [dependencies] -getrandom = { version = "0.2", features = ["js"] } eframe = "0.23" hhmmss = "0.1" itertools = "0.11" rand = "0.8" rand_chacha = "0.3" toml = "0.8" + +# native: +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +env_logger = "0.10" + +# web: +[target.'cfg(target_arch = "wasm32")'.dependencies] +wasm-bindgen-futures = "0.4" + +[profile.release] +opt-level = 2 # fast and small wasm + +# Optimize all dependencies even in debug builds: +[profile.dev.package."*"] +opt-level = 2 + +[patch.crates-io]