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

Method deserialize_file

crates/c-api/include/wasmtime/module.hh:120–129  ·  view source on GitHub ↗

* \brief Deserializes a module from an on-disk file. * * This function is the same as `deserialize` except that it reads the data * for the serialized module from the path on disk. This can be faster than * the alternative which may require copying the data around. * * It is not safe to pass arbitrary input to this function, it is only safe to * pass in output from previous ca

Source from the content-addressed store, hash-verified

118 * https://docs.wasmtime.dev/api/wasmtime/struct.Module.html#method.deserialize
119 */
120 static Result<Module> deserialize_file(Engine &engine,
121 const std::string &path) {
122 wasmtime_module_t *ret = nullptr;
123 auto *error =
124 wasmtime_module_deserialize_file(engine.capi(), path.c_str(), &ret);
125 if (error != nullptr) {
126 return Error(error);
127 }
128 return Module(ret);
129 }
130
131 /// Returns the list of types imported by this module.
132 ImportType::List imports() const {

Callers

nothing calls this directly

Calls 4

ErrorClass · 0.70
ModuleClass · 0.70
capiMethod · 0.45

Tested by

no test coverage detected