# Async runtimes rust canister and ICP

**URL:** <https://forum.dfinity.org/t/async-runtimes-rust-canister-and-icp/40978>\
**Category:** Developers\
**Created:** [February 7, 2025, 10:13pm UTC](https://forum.dfinity.org/t/async-runtimes-rust-canister-and-icp/40978 "2025-02-07T22:13:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghostwhoowalks](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@ghostwhoowalks](https://forum.dfinity.org/u/ghostwhoowalks)\
**Post date:** [February 7, 2025, 10:13pm UTC](https://forum.dfinity.org/t/async-runtimes-rust-canister-and-icp/40978/1 "2025-02-07T22:13:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [February 10, 2025, 12:31pm UTC](https://forum.dfinity.org/t/async-runtimes-rust-canister-and-icp/40978/2 "2025-02-10T12:31:03Z")

</div>

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](https://github.com/dfinity/ic/blob/d551249969d8f1043068af94940b6eae9714cda3/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

> [@ghostwhoowalks](#):
>
> Also just out of curiosity would any async runtime that were WASM compatible have sufficed?

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
