Skip to content

Commit 67dc370

Browse files
committed
fix: add clarity-wasm feature flag in context
1 parent 05467a2 commit 67dc370

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clarity/src/vm/contexts.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ use serde_json::json;
2424
use stacks_common::consts::CHAIN_ID_TESTNET;
2525
use stacks_common::types::chainstate::StacksBlockId;
2626
use stacks_common::types::StacksEpochId;
27-
use wasmtime::{Engine, Linker};
27+
#[cfg(feature = "clarity-wasm")]
28+
use wasmtime::Engine;
2829

2930
use super::analysis::{self, ContractAnalysis};
3031
#[cfg(feature = "clarity-wasm")]
@@ -207,6 +208,7 @@ pub struct GlobalContext<'a> {
207208
/// This is the chain ID of the transaction
208209
pub chain_id: u32,
209210
pub eval_hooks: Option<Vec<&'a mut dyn EvalHook>>,
211+
#[cfg(feature = "clarity-wasm")]
210212
pub engine: Engine,
211213
}
212214

@@ -1655,6 +1657,7 @@ impl<'a> GlobalContext<'a> {
16551657
cost_track: LimitedCostTracker,
16561658
epoch_id: StacksEpochId,
16571659
) -> GlobalContext {
1660+
#[cfg(feature = "clarity-wasm")]
16581661
let engine = Engine::default();
16591662

16601663
GlobalContext {
@@ -1667,6 +1670,7 @@ impl<'a> GlobalContext<'a> {
16671670
epoch_id,
16681671
chain_id,
16691672
eval_hooks: None,
1673+
#[cfg(feature = "clarity-wasm")]
16701674
engine,
16711675
}
16721676
}

0 commit comments

Comments
 (0)