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

Implement cross-language await syntax for KJ Promises and Rust Futures #3280

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

@harrishancock harrishancock force-pushed the harris/rust-async branch 7 times, most recently from 317008e to dc5479b Compare January 7, 2025 13:02
@danlapid
Copy link
Collaborator

danlapid commented Jan 8, 2025

Would it be reasonable to request a README.md on the src/rust/async directory explaining what we're doing, the approach and maybe pointers as to how to understand the code? Which part interacts with which and in what way?
Was trying to read it and while I have some context it's hard to grok how everything interacts 😢

@harrishancock
Copy link
Collaborator Author

Definitely! I won't ask for review until code comments are fleshed out, and I have an explainer written.

@harrishancock harrishancock force-pushed the harris/rust-async branch 2 times, most recently from 933578e to 65c05c2 Compare January 17, 2025 18:22
@jasnell
Copy link
Member

jasnell commented Jan 17, 2025

The c++ parts are looking good. One concern I do have is this is a fairly large complicated bit of code... would it make sense / be possible for it to be split out into a separate dependency outside of workerd?

@harrishancock
Copy link
Collaborator Author

@jasnell Yes, I agree. I think the capnproto repo is the most logical home for most of this, maybe in kj/compat. Or a separate repo, call it kj-rs, could also make sense.

I'll keep it here in draft form for now while I iterate, but will think about how to support this in capnproto's build.

CoAwaitWaker is now a simpler data structure, with a new FuturePollEvent base class taking on the burden of connecting the various events and promises.
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

Successfully merging this pull request may close these issues.

3 participants