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])
| 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) |