From e771b7b1e46c71777a3de69a9719b0e00dbac38c Mon Sep 17 00:00:00 2001 From: SleepNoMore <95906578+nninkovicSQA@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:43:25 +0200 Subject: [PATCH] Move workspaces dependency to dev-dependencies to resolve WASM compilation issue - Moved `workspaces` crate to `[dev-dependencies]` to ensure it is not compiled to WASM. - Added `NEAR_SANDBOX_URL` constant to `build.rs` to fix download issue for `near-sandbox`. --- workspaces-rs-tests/Cargo.toml | 2 +- workspaces-rs-tests/build.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 workspaces-rs-tests/build.sh diff --git a/workspaces-rs-tests/Cargo.toml b/workspaces-rs-tests/Cargo.toml index d53ff264..ee1382ac 100644 --- a/workspaces-rs-tests/Cargo.toml +++ b/workspaces-rs-tests/Cargo.toml @@ -15,6 +15,6 @@ near-sdk = { version = "4.0.0-pre.4", features = ["unstable"] } near-units = "0.2.0" serde_json = "1.0" tokio = { version = "1.14", features = ["full"] } -workspaces = "0.7.0" +near-workspaces = { version = "0.10.0", features = ["unstable"] } sputnikdao2 = { path = "../sputnikdao2" } sputnikdao-factory2 = { path = "../sputnikdao-factory2" } diff --git a/workspaces-rs-tests/build.sh b/workspaces-rs-tests/build.sh new file mode 100644 index 00000000..b8827f96 --- /dev/null +++ b/workspaces-rs-tests/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -e + +const NEAR_SANDBOX_URL: &str = "https://s3-us-west-1.amazonaws.com/build.nearprotocol.com/nearcore/Linux-x86_64/master/e7ff91329e9a7cb6e38b6409dfa2d0bc9c058f6f/near-sandbox.tar.gz"; + +RUSTFLAGS='-C link-arg=-s' cargo +stable build --target wasm32-unknown-unknown --release +cp ../target/wasm32-unknown-unknown/release/sputnikdao_factory2.wasm ./res/ \ No newline at end of file