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

Method load_code_file

crates/wasmtime/src/engine.rs:924–934  ·  view source on GitHub ↗
(
        &self,
        file: File,
        expected: ObjectKind,
    )

Source from the content-addressed store, hash-verified

922 /// Like `load_code_bytes`, but creates a mmap from a file on disk.
923 #[cfg(feature = "std")]
924 pub(crate) fn load_code_file(
925 &self,
926 file: File,
927 expected: ObjectKind,
928 ) -> Result<Arc<crate::CodeMemory>> {
929 self.load_code(
930 crate::runtime::vm::MmapVec::from_file(file)
931 .with_context(|| "Failed to create file mapping".to_string())?,
932 expected,
933 )
934 }
935
936 pub(crate) fn load_code(
937 &self,

Callers 2

deserialize_open_fileMethod · 0.80
deserialize_fileMethod · 0.80

Calls 3

load_codeMethod · 0.80
with_contextMethod · 0.80
to_stringMethod · 0.45

Tested by

no test coverage detected