From 3288c4c5e0c94e522e3e2c1a9c89134a17c719d0 Mon Sep 17 00:00:00 2001 From: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com> Date: Sun, 11 Aug 2024 22:53:56 +0200 Subject: [PATCH] Add `js` feature for `uuid` wasm compat Co-authored-by: kubectl --- generate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/generate.sh b/generate.sh index 6cceb0b..1bb1cc6 100755 --- a/generate.sh +++ b/generate.sh @@ -26,6 +26,7 @@ find src -type f -exec sed -i '/^\s*\/\/\/\s*$/d' {} \; # Cookie storage sed -i 's/reqwest::Client::new()/{#[cfg(target_family = "wasm")] {reqwest::Client::new()}\n #[cfg(not(target_family = "wasm"))] { reqwest::Client::builder().cookie_store(true).build().unwrap()}\n }/g' src/apis/configuration.rs sed -i 's/features = \["json", "multipart"\]/features = \["json", "cookies", "multipart"\]/g' Cargo.toml +printf '\n[features]\njs = ["uuid/js"]\n' >> Cargo.toml # add wasm feature #Fix example printf "\n[dev-dependencies]\ntokio = { version = '1', features = ['macros', 'rt-multi-thread'] }" >> Cargo.toml