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

Method compile

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

* \brief Compiles a module from the WebAssembly text format. * * This function will automatically use `wat2wasm` on the input and then * delegate to the #compile function. */

Source from the content-addressed store, hash-verified

38 * delegate to the #compile function.
39 */
40 static Result<Module> compile(Engine &engine, std::string_view wat) {
41 auto wasm = wat2wasm(wat);
42 if (!wasm) {
43 return wasm.err();
44 }
45 auto bytes = wasm.ok();
46 return compile(engine, bytes);
47 }
48#endif // WASMTIME_FEATURE_WAT
49
50 /**

Callers 1

compile_uncachedFunction · 0.45

Calls 10

wat2wasmFunction · 0.85
wasmtime_module_newFunction · 0.85
ErrorClass · 0.70
ModuleClass · 0.70
compileFunction · 0.50
errMethod · 0.45
okMethod · 0.45
capiMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected