-
Notifications
You must be signed in to change notification settings - Fork 100
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
Async / Await / Generators / Coroutines in Plugins #702
Comments
Hi! Thanks for the kind words 😃 Which PDK language are you looking at with those limitations? JS? |
My main candidates for plugin languages are Python (doesn't exist yet, I know :-) ) with asyncio, JS with standard promises and generators, and Rust with tokio. |
I would like to add my usecase to this as well. For me, my plugins need not be async. But they call a bunch of host functions which will be async. So technically the plugin would see all host functions as sync calls but the asynchronoucity would be provided by the host function and the host's runtime (tokio in my case) |
This has been a tricky question for me because oftentimes, async / await does work at a syntax level in wasm, but not at a semantic level. The primary issue is wasm doesn't have the capability to support the underlying primitives just yet. There are some specs that I think will address this. but it may be a while before that makes it into all the runtimes and compilers. In the meantime i definitely think we can do better at documenting what can be done and what can't. We're also working on encoding some common patterns people might have to deal with concurrency. Example: #696 For the time being, you can do things like @YourTechBud 's use case but you need to code it up yourself. Please share any experiences you have though, we'd love to formalize some more of these ideas. |
Just discovered Extism today and it looks awesome!
One particular thing is missing for my use case: Support for Async / await / generators / coroutines in plugins. I don't see anything about this in the FAQ either. Have there been any thoughts about it?
The text was updated successfully, but these errors were encountered: