Calling block_on from within wasm. #5667
Unanswered
simonwarchol
asked this question in
Q&A
Replies: 1 comment 9 replies
-
Tokio's WASM support is very limited. Trying to use something unsupported results in a runtime error. Without further information, I cannot help you. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to call block_on and capture the result of my async function in wasm but getting runtime errors. Does anyone have suggestions?
let result = tokio::runtime::Builder::new_current_thread()
.build()
.unwrap()
.block_on(async_fn())
Beta Was this translation helpful? Give feedback.
All reactions