-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: allow running JavaScript workers with async methods #143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉; this is great!, although I think it would be good to split the main commit into two:
- quickjs -> javy, binary removal
- async feature
Sure, let me do it for traceability on the PR, although they will be squashed on |
63d10dc
to
f050856
Compare
Done @ereslibre ! 😄 |
👏 Could we merge without squash? I think we can rebase and merge, no? If so, that would be great! Thanks a lot @Angelmmiguel. |
Yeah, that's possible too. However, I usually converge commits into a single one that refers to the PR. Sometimes PRs may include multiple commits like |
👍, however if I'm not mistaken the GitHub option "Rebase and merge" does not enforce anybody to rebase their own history, given they will just fast forward on top of these changes. Anyhow, it's fine by me. |
Yeah, that option is available. I usually |
Add support for async methods in JavaScript workers. For that, I split the JavaScript runtime in two steps:
requestToHandler
method to get theresponse
method / object.response
to aPromise
so we cover all use cases (async / sync).result
variable.To add support on the JS Runtime side, I upgraded the JS kit to use the new javy crate. It adds new features and a better high-level APIs for running JS code in Rust.
I also included a new example and a new e2e test.
It closes #142