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

Method new

crates/wasmtime/src/runtime/code.rs:128–142  ·  view source on GitHub ↗
(
        mmap: Arc<CodeMemory>,
        signatures: TypeCollection,
        types: Types,
    )

Source from the content-addressed store, hash-verified

126
127impl EngineCode {
128 pub fn new(
129 mmap: Arc<CodeMemory>,
130 signatures: TypeCollection,
131 types: Types,
132 ) -> Result<EngineCode, OutOfMemory> {
133 // The corresponding unregister for this is below in `Drop for
134 // EngineCode`.
135 crate::module::register_code(&mmap, mmap.raw_addr_range())?;
136
137 Ok(EngineCode {
138 original_code: mmap,
139 signatures,
140 types,
141 })
142 }
143
144 #[cfg(feature = "component-model")]
145 pub fn types(&self) -> &Types {

Callers

nothing calls this directly

Calls 10

register_codeFunction · 0.85
OkFunction · 0.85
SharedClass · 0.85
StoreCodeClass · 0.85
raw_addr_rangeMethod · 0.80
publishMethod · 0.80
newFunction · 0.50
tunablesMethod · 0.45
deep_cloneMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected