-
mort
Gah I didn't consider that everything that uses tokio takes a magical hidden executor parameter that's passed as global state, so moving from async-std to tokio kinda changes the signature
-
mort
I apologise, I should've tested better
-
mort
I'm realising that I don't understand how this used to work even. I think the rest of gram uses smol? So why did it ever work to use crates which use async-std? Is async-std magically compatible with smol executors while tokio is not? I find this thing so confusing
-
krig
Yeah I have no idea how async-std works.. maybe it doesn’t have the hidden runtime but just spins up a runtime as necessary or something? haha
-
krig
but I think I might have a fix for the lsp call at least, it’s compiling now..
-
krig
anyway no need to apologize, it’s literally the exact footgun that this article says is a valid complaint about async rust 😄 https://herecomesthemoon.net/2026/10/async-rust-where-does-the-scheduler-live/
-
mort
I wonder if it'd work to just wrap main functions in #[tokio::main]? I really don't understand how runtimes are passed but if they're just magic thread local globals then that should make a runtime available to anything which needs tokio shouldn't it
-
krig
I don’t have time to look too much right now, but I pasted my patch in the bug, have a look at that! I think it might work... But it panics if there is no handle anywhere so might still need the tokio::main…
-
krig
I think the context lets it run on the smol runtime? if I get the docs correctly..
-
mort
I think the solution for Jupyter is to use async-dispatcher-runtime, the docs claims that it's compatible with smol (and explicitly calls out "GPUI devs" as the primary consumers of that feature for some reason)
-
krig
hah, good I guess
-
krig
I realize the handle it needs is not a tokio handle but for the smol runtime so now I am optimistic again.. and the tests passed
-
mort
Though, wait, async-dispatcher-runtime also brings in async-std. I really don't get how this ecosystem is meant to work
-
krig
-_- the jupyter crates just frustrate me every time I look at them..
-
mort
Kinda feeling like just reverting all this async bs and going with what you suggested all along about an async adapter over a non-async crate. Tho I don't know how to do that. I had no idea async was this messy, I don't think I'll touch anything async any more when any mistake can result in checks and tests passing but panic in some obscure feature I don't even know about
-
krig
aah I haven’t given up just yet.. but I understand completely. async is definitely my least favorite rust feature.
-
krig
I think my patch worked at least, tested by letting it download the taplo lsp and it didn’t panic
-
krig
created a PR with my patches so far, now I have to switch to other things for a while
-
krig
So I think everything except the repl is solved now, and the repl barely works anyway... so I merged the fixes
-
krig
and the repl is at least not panicking now. So I think I have sorted out all the panics and async-std is still out, which is nice
-
Rocky2
Sorry was having problems with sending messages before
-
Rocky2
Hello 👋 I'd love to try out Gram, I just have some questions about the extension system 1. Are extensions general in purpose or limited to language support? 2. Can extensions be writted in any language that compiles to WebAssrmbly?