Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

884 B
Raw Blame

Serializing and Deserializing Modules

You can also browse this source code online and clone the wasmtime repository to run the example locally:

This example shows how to compile a module once and serialize its compiled representation to disk and later deserialize it to skip compilation on the critical path. See also the pre-compilation example for ahead-of-time compilation.

Host Source

{{#include ../examples/serialize.rs}}
{{#include ../examples/serialize.c}}
{{#include ../examples/serialize.cc}}