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

Method precompile_module

crates/wasmtime/src/engine.rs:705–709  ·  view source on GitHub ↗

Ahead-of-time (AOT) compiles a WebAssembly module. The `bytes` provided must be in one of two formats: A [binary-encoded][binary] WebAssembly module. This is always supported. A [text-encoded][text] instance of the WebAssembly text format. This is only supported when the `wat` feature of this crate is enabled. If this is supplied then the text format will be parsed before validation. Note that t

(&self, bytes: &[u8])

Source from the content-addressed store, hash-verified

703 /// [binary]: https://webassembly.github.io/spec/core/binary/index.html
704 /// [text]: https://webassembly.github.io/spec/core/text/index.html
705 pub fn precompile_module(&self, bytes: &[u8]) -> Result<Vec<u8>> {
706 crate::CodeBuilder::new(self)
707 .wasm_binary_or_text(bytes, None)?
708 .compile_module_serialized()
709 }
710
711 /// Same as [`Engine::precompile_module`] except for a
712 /// [`Component`](crate::component::Component)

Callers 8

aot_compilesFunction · 0.80
serialize_deterministicFunction · 0.80
test_tail_call_defaultFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
run_wastMethod · 0.80

Calls 3

wasm_binary_or_textMethod · 0.80
newFunction · 0.50

Tested by 3

test_tail_call_defaultFunction · 0.64