File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ path = "./src/libclarity.rs"
20
20
[dependencies ]
21
21
serde = " 1"
22
22
serde_derive = " 1"
23
- serde_stacker = " 0.1"
24
23
regex = " 1"
25
24
lazy_static = " 1.4.0"
26
25
integer-sqrt = " 0.1.3"
@@ -44,6 +43,9 @@ rstest_reuse = { version = "0.5.0" }
44
43
# but it isn't necessary for tests: only benchmarks. therefore, commenting out for now.
45
44
# criterion = "0.3"
46
45
46
+ [target .'cfg(not(target_family = "wasm"))' .dependencies ]
47
+ serde_stacker = " 0.1"
48
+
47
49
[features ]
48
50
default = [" rusqlite" ]
49
51
developer-mode = [" stacks_common/developer-mode" ]
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ macro_rules! clarity_serializable {
53
53
}
54
54
}
55
55
impl ClarityDeserializable <$Name> for $Name {
56
+ #[ cfg( not( target_family = "wasm" ) ) ]
56
57
fn deserialize( json: & str ) -> Result <Self > {
57
58
let mut deserializer = serde_json:: Deserializer :: from_str( & json) ;
58
59
// serde's default 128 depth limit can be exhausted
@@ -65,6 +66,12 @@ macro_rules! clarity_serializable {
65
66
InterpreterError :: Expect ( "Failed to deserialize vm.Value" . into( ) ) . into( )
66
67
} )
67
68
}
69
+ #[ cfg( target_family = "wasm" ) ]
70
+ fn deserialize( json: & str ) -> Result <Self > {
71
+ serde_json:: from_str( json) . map_err( |_| {
72
+ InterpreterError :: Expect ( "Failed to deserialize vm.Value" . into( ) ) . into( )
73
+ } )
74
+ }
68
75
}
69
76
} ;
70
77
}
You can’t perform that action at this time.
0 commit comments