goscript icon indicating copy to clipboard operation
goscript copied to clipboard

Don't call canonicalize when building for wasm32-wasi

Open zackradisic opened this issue 4 years ago • 0 comments

After building for the wasm32-wasi target, running the engine failed and I narrowed it down to calls to canonicalize() and printing the errors give the following message:

Error { kind: Unsupported, message: "operation not supported on this platform" }

It appears that wasi doesn't support canonicalize.

The changes I made simply skip invoking canonicalize() if the build target is wasm-wasi, and I don't think it's too much to just require that wasm users of the library provide an absolute path if they wish to run goscripts.

zackradisic avatar Sep 23 '21 15:09 zackradisic