Refactor.

This commit is contained in:
Nuno Cruces
2023-04-22 00:15:44 +01:00
parent 7e6d178122
commit bed2ee7674
5 changed files with 44 additions and 44 deletions

View File

@@ -52,7 +52,12 @@ func instantiateModule() (*module, error) {
func compileModule() {
ctx := context.Background()
sqlite3.runtime = wazero.NewRuntime(ctx)
vfs.Instantiate(ctx, sqlite3.runtime)
env := vfs.Export(sqlite3.runtime.NewHostModuleBuilder("env"))
_, sqlite3.err = env.Instantiate(ctx)
if sqlite3.err != nil {
return
}
bin := Binary
if bin == nil && Path != "" {