Skip to content

Commit 91a646d

Browse files
committed
Move stylus-test to dev-dependencies
This change avoids compiling the test and its dependencies on the wasm target. This was leading to a compile error because a nested dependency required to set a explicit feature for wasm.
1 parent 8c2493a commit 91a646d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stylus-sdk/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ alloy-primitives.workspace = true
1515
alloy-sol-types.workspace = true
1616
cfg-if.workspace = true
1717
derivative.workspace = true
18-
stylus-test.workspace = true
1918
hex = { workspace = true, default-features = false, features = ["alloc"] }
2019
keccak-const.workspace = true
2120
lazy_static.workspace = true
@@ -27,12 +26,13 @@ regex = { workspace = true, optional = true }
2726
mini-alloc = { workspace = true, optional = true }
2827
stylus-proc.workspace = true
2928
stylus-core.workspace = true
30-
rclite.workspace = true
3129

3230
[dev-dependencies]
3331
paste.workspace = true
3432
sha3.workspace = true
3533
alloy-primitives = { workspace = true, default-features = false, features=["tiny-keccak"] }
34+
rclite.workspace = true
35+
stylus-test.workspace = true
3636

3737
[package.metadata.docs.rs]
3838
features = ["default", "docs", "debug", "export-abi"]

stylus-sdk/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ pub use stylus_proc;
4646

4747
// If the target is a testing environment, we export the stylus test module as the `testing` crate
4848
// for Stylus SDK consumers, to be used as a test framework.
49-
#[cfg(not(target_arch = "wasm32"))]
49+
#[cfg(all(not(target_arch = "wasm32"), test))]
5050
pub use rclite as rc;
51-
#[cfg(not(target_arch = "wasm32"))]
51+
#[cfg(all(not(target_arch = "wasm32"), test))]
5252
pub use stylus_test as testing;
5353

5454
#[macro_use]

0 commit comments

Comments
 (0)