Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Fixes needed in js/wasi/hello-world example #142

Open
fritzbauer opened this issue Oct 19, 2021 · 3 comments
Open

Fixes needed in js/wasi/hello-world example #142

fritzbauer opened this issue Oct 19, 2021 · 3 comments

Comments

@fritzbauer
Copy link

I was facing the following issues when using the hello-world example:

  • The index.html is not loading correctly in chrome, because type="module" is not specified in the <script> tag.
  • When instantiating the WASI object no preopens are specified. This is working fine for the hello-world example, but when trying to do any additional File IO errors will occur. I am not sure if I overlooked some obvious documentation for this parameter, but it would've helped me a lot if something like preopens: { '/': '/' } could be included in the example.
  • When running npm run dev the helloworld.wasm cannot be loaded, because it is not copied from the static directory to the dist directory and parcel does not serve it from the static directory
  • It would be great to have a working npm run build target to be able to host the static files.
@ChristophP
Copy link

ChristophP commented Jul 10, 2022

Hi, I was excited to try out the example too, but unfortunately also couldn't get the example to work.
The example specifies code that uses wasi.getImports() which I believe has been removed, so probably the example needs to be updated for version 1.x +.

@ChristophP
Copy link

Also since the example suggests using parcel, I'm not sure if parcel v2 still works with it the same way.

@DougAnderson444
Copy link

the example also uses a version from years ago (0.10.0 vs today's 1.2.2), and the API has changed since then

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants