MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / store_code

Method store_code

crates/wasmtime/src/runtime/module/registry.rs:179–183  ·  view source on GitHub ↗

Fetches the `StoreCode` for a given `EngineCode`.

(&self, engine_code: &EngineCode)

Source from the content-addressed store, hash-verified

177
178 /// Fetches the `StoreCode` for a given `EngineCode`.
179 pub fn store_code(&self, engine_code: &EngineCode) -> Option<&StoreCode> {
180 let store_code_pc = self.store_code_base(engine_code)?;
181 let (_, code) = self.loaded_code.range(store_code_pc..).next()?;
182 Some(&code.code)
183 }
184
185 /// Fetches the base `StoreCodePC` for a given `EngineCode`.
186 pub fn store_code_base(&self, engine_code: &EngineCode) -> Option<StoreCodePC> {

Callers 1

in_storeMethod · 0.80

Calls 3

store_code_baseMethod · 0.80
nextMethod · 0.45
rangeMethod · 0.45

Tested by

no test coverage detected