AssemblyScript / examples

A collection of AssemblyScript examples.
https://assemblyscript.org
MIT License
283 stars 50 forks source link

Trying to run the examples gives error: "LinkError: WebAssembly.instantiate(): Import #0 module="env" function="Math.log"" #17

Closed Sakari369 closed 1 year ago

Sakari369 commented 2 years ago

Trying to build and load the examples with a recent version of Chrome and Safari on macOS Monterey arm64 gives the following error in console.log:

LinkError: WebAssembly.instantiate(): Import #0 module="env" function="Math.log" error: function import requires a callable

dcodeIO commented 2 years ago

Seems the examples are not yet updated to v0.20 of the compiler but still require v0.19. Makes sense to update them :)

Sakari369 commented 2 years ago

Well, it definitely makes as one cannot run the examples right now without having to figure out how they should work .. :) :P

jxlust commented 2 years ago

I use in v0.20, but I don't know how to set it globally

env: {
       'Math.random': Math.random
      }
MaxGraey commented 1 year ago

Should be fixed now