-
Notifications
You must be signed in to change notification settings - Fork 2
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
rpython main.py throw #1
Comments
Hmm I know what this is.. This usually happens when your main.py doesn't call to any javascript APIs (import javascript). Try to import javascript and call javascript.Object('console')['log'].call('hello world') on your main function, and please attach or paste your main.py file so I can reproduce the error that occurs |
And I think, I need to update my example main.py from the README. Either that or I need to fix it to enable programs that don't interface to javascript (which doesn't serve a purpose but at least it will clear the confusion) |
I solved this by removing "_onresolve", "_onfunctioncall" from EXPORTED_FUNCTIONS=["_main", "_malloc", "_onresolve", "_onfunctioncall"] |
That was a pretty bad idea... onfunctioncall is for @function decorator and onresolve is for @asynchronous decorator, without it you can't interface to javascript API except with writing your own exported functions... |
Sure, just wait for the correct solution here. |
Is it possible to generate a standalone wasm file that can be loaded by something like pywasm? |
It is not possible, currently what this fork does is replacing gcc with emcc on RPython's program C source compiling phase. So it generally depends on all the emscripten glue code, hence I name the implementation emscripten.py on the javascript directory. Maybe in the future when there's another alternative that replace cc like emcc does, that uses WASI (so it will run on any webassembly runtime, not just browsers and node.js) I will add that to this fork. |
Hi, I was excited to find this project. I can't wait to give a try. And I meet the following error
Any idea?
The text was updated successfully, but these errors were encountered: