MCPcopy Create free account
hub / github.com/dispatchrun/wazergo / loadModule

Function loadModule

module_test.go:87–93  ·  view source on GitHub ↗
(ctx context.Context, runtime wazero.Runtime, filePath string)

Source from the content-addressed store, hash-verified

85}
86
87func loadModule(ctx context.Context, runtime wazero.Runtime, filePath string) (api.Module, error) {
88 b, err := os.ReadFile(filePath)
89 if err != nil {
90 return nil, err
91 }
92 return runtime.Instantiate(ctx, b)
93}

Callers 1

Calls 1

InstantiateMethod · 0.65

Tested by

no test coverage detected