Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dome Hello World in readme may not work #62

Closed
Puellaquae opened this issue Jun 16, 2022 · 4 comments
Closed

Dome Hello World in readme may not work #62

Puellaquae opened this issue Jun 16, 2022 · 4 comments

Comments

@Puellaquae
Copy link
Contributor

If run

$ cd example_js
$ wasmedge --dir .:. ../target/wasm32-wasi/release/wasmedge_quickjs.wasm hello.js WasmEdge Runtime

which written in readme will show ReferenceError: could not load module filename 'process'. The module files are not loaded into wasm environment (or maybe there has other way to access the module files that I don't know).

Or use this?

$ wasmedge --dir .:. ./target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/hello.js WasmEdge Runtime
@L-jasmine
Copy link
Collaborator

$ wasmedge --dir .:. ./target/wasm32-wasi/release/wasmedge_quickjs.wasm example_js/hello.js WasmEdge Runtime

because wasmedge_quickjs.wasm will load 'process' from './modules'.

I will update README.md to fix it.

@Puellaquae
Copy link
Contributor Author

Hi @L-jasmine , can let me to fix this?

@alabulei1
Copy link
Member

Hi @L-jasmine , can let me to fix this?

@Puellaquae Much appreciated. Please do it!

@vishalchandra
Copy link

This does not seem to be working from this example.

setTimeout(() => {
    print('timeout 2s');
}, 2000);

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

No branches or pull requests

4 participants