MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / new

Method new

crates/tinywasm/src/store/mod.rs:67–79  ·  view source on GitHub ↗

Create a new store

(engine: Engine)

Source from the content-addressed store, hash-verified

65impl Store {
66 /// Create a new store
67 pub fn new(engine: Engine) -> Self {
68 let id = STORE_ID.fetch_add(1, Ordering::Relaxed);
69 Self {
70 id,
71 module_instances: Vec::new(),
72 state: State::default(),
73 call_stack: CallStack::new(engine.config()),
74 value_stack: ValueStack::new(engine.config()),
75 engine,
76 execution_fuel: 0,
77 execution_active: false,
78 }
79 }
80
81 /// Get a module instance by the internal id
82 pub fn get_module_instance(&self, addr: ModuleInstanceAddr) -> Option<ModuleInstance> {

Callers

nothing calls this directly

Calls 1

configMethod · 0.80

Tested by

no test coverage detected