aboutsummaryrefslogtreecommitdiffhomepage
path: root/targets
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2023-07-06 12:01:52 +0200
committerRon Evans <[email protected]>2023-08-04 11:59:11 +0200
commita93f0ed12a30d694ad8db2a2636b1247e772c3e8 (patch)
treee1790e1e4cb11623e05efb93450b5ad937afcf51 /targets
parentc25dd0a972a1d68b4d154831a6d196e28f17ddad (diff)
downloadtinygo-a93f0ed12a30d694ad8db2a2636b1247e772c3e8.tar.gz
tinygo-a93f0ed12a30d694ad8db2a2636b1247e772c3e8.zip
all: Go 1.21 support
Diffstat (limited to 'targets')
-rw-r--r--targets/wasm_exec.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/targets/wasm_exec.js b/targets/wasm_exec.js
index 8e29d6266..5dfc67c35 100644
--- a/targets/wasm_exec.js
+++ b/targets/wasm_exec.js
@@ -284,7 +284,7 @@
return 0;
},
},
- env: {
+ gojs: {
// func ticks() float64
"runtime.ticks": () => {
return timeOrigin + performance.now();
@@ -444,6 +444,10 @@
},
}
};
+
+ // Go 1.20 uses 'env'. Go 1.21 uses 'gojs'.
+ // For compatibility, we use both as long as Go 1.20 is supported.
+ this.importObject.env = this.importObject.gojs;
}
async run(instance) {