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

Method get

crates/cli/src/wast_runner.rs:54–61  ·  view source on GitHub ↗
(&self, module_id: Option<wast::token::Id<'_>>)

Source from the content-addressed store, hash-verified

52 }
53
54 fn get(&self, module_id: Option<wast::token::Id<'_>>) -> Option<ModuleInstance> {
55 match module_id {
56 Some(module_id) => {
57 self.modules.get(module_id.name()).or_else(|| self.named_modules.get(module_id.name())).cloned()
58 }
59 None => self.last_module.clone(),
60 }
61 }
62
63 fn last(&self) -> Option<ModuleInstance> {
64 self.last_module.clone()

Callers 2

get_idxMethod · 0.45
run_fileMethod · 0.45

Calls 1

nameMethod · 0.80

Tested by

no test coverage detected