-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Javascript Take II #4485
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
Javascript Take II #4485
Conversation
@wolfv, I'd siggest to search and go over existing tickets/PRs related to JavaScript port, and post links to this PR, because likely many people interested in that stuff are not aware of this new development. |
Thanks @wolfv for picking this up. I'm happy to merge this now, except for one item: what was your reason to remove the |
@dpgeorge you're right! I just reverted removing the patch. I also checked, and it does seem like a useful patch (even though I did not have to apply it for my simple tests). It would be great if this was merged. I have some additional features that I would put in a next PR. (e.g. a javascript module that allows |
@wolfv in your single commit there are 2 lines in extmod/moduselect.c that are changed. These should go in a separate commit to be able to more easily track changes to the core and ports separately. I can do this myself during the merge of this PR (the commit would be authored by me, but I'd acknowledge you in the commit message), or you can split it out yourself here in this PR (so there'd be 3 commits in total in this PR). Let me know what you'd prefer. |
I'll remove it from this PR, check if it still builds fine, and then create a seperate PR. |
I had to remove |
opened a seperate PR #4601 |
I guess this is good to go in now that #4601 is merged? |
I could re-add the warning flags? otherwise, yes! |
i think it's fine to merge as-is, I will open a next PR with more features and re-add the flags there. |
Yes, it would be best not to remove them, so please undo that change. |
done and rebased. |
I saw the MicroPython JS port from roughly a year ago (#3575).
It did not immediately compile, and the async loading of Emscripten wasn't properly taken care of (needed some fixing in wrapper.js).
I applied the suggestions in the thread, and fixed wrapper.js so that it loads the bytecode correctly and only executes C-functions after
"onRuntimeInitialized"
.Please let me know if anything else is necessary to merge this excellent feature (all credit to @flowergrass !)
I'm looking at ways to also precompile Python to bytecode, and hook it up to micro python.