Adds Runtime.NewNamespace to allow intentional name collisions (#604)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2022-06-01 10:03:19 +08:00
committed by GitHub
parent e0e9e27326
commit adc7e5b170
57 changed files with 1466 additions and 733 deletions

View File

@@ -1,4 +1,4 @@
package add
package main
import (
"context"
@@ -38,7 +38,7 @@ func main() {
host, err := r.NewModuleBuilder("host/math").
ExportFunction("add", func(v1, v2 uint32) uint32 {
return v1 + v2
}).Instantiate(ctx)
}).Instantiate(ctx, r)
if err != nil {
log.Panicln(err)
}