diff options
author | Ayke van Laethem <[email protected]> | 2023-07-06 12:01:52 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-08-04 11:59:11 +0200 |
commit | a93f0ed12a30d694ad8db2a2636b1247e772c3e8 (patch) | |
tree | e1790e1e4cb11623e05efb93450b5ad937afcf51 /targets | |
parent | c25dd0a972a1d68b4d154831a6d196e28f17ddad (diff) | |
download | tinygo-a93f0ed12a30d694ad8db2a2636b1247e772c3e8.tar.gz tinygo-a93f0ed12a30d694ad8db2a2636b1247e772c3e8.zip |
all: Go 1.21 support
Diffstat (limited to 'targets')
-rw-r--r-- | targets/wasm_exec.js | 6 |
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) { |