Skip to content

Commit

Permalink
Move workspaces dependency to dev-dependencies to resolve WASM compil…
Browse files Browse the repository at this point in the history
…ation 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`.
  • Loading branch information
nninkovicSQA authored Oct 11, 2024
1 parent 63a02b7 commit e771b7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion workspaces-rs-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
7 changes: 7 additions & 0 deletions workspaces-rs-tests/build.sh
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit e771b7b

Please sign in to comment.