I see that inside the canister the async runtime is a homegrown and essentially single threaded. What is the runtime used outside the canister/WASM boundary? Is it tokio? Also just out of curiosity would any async runtime that were WASM compatible have sufficed? Thanks in advance.
That is because canisters are defined to be single-threaded
Canisters are run using wasmtime, and outside of that I don’t know what the replicas use. In the root Cargo.toml of the big monorepo I see actix-web and tokio as imports, so I would guess that it could be actix-web since it builds on top of tokio
I’m not sure, but it’s unlikely that it would have worked out of the box. The system interface offers some very custom hooks for error handling and I don’t think you could lift a standard runtime without any serious changes