MustCompile is like Compile but it panics if there is an error.
(ctx context.Context, runtime wazero.Runtime, mod HostModule[T])
| 97 | |
| 98 | // MustCompile is like Compile but it panics if there is an error. |
| 99 | func MustCompile[T Module](ctx context.Context, runtime wazero.Runtime, mod HostModule[T]) *CompiledModule[T] { |
| 100 | compiledModule, err := Compile(ctx, runtime, mod) |
| 101 | if err != nil { |
| 102 | panic(err) |
| 103 | } |
| 104 | return compiledModule |
| 105 | } |
| 106 | |
| 107 | // Instantiate creates an instance of the compiled module for in the given runtime |
| 108 | // |