this post was submitted on 09 Oct 2023
8 points (90.0% liked)
Rust
6800 readers
12 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You can manually convert a
tokio::main
to a regularmain
by constructing a tokio runtime and telling it to block on a top-level future (e.g. an async block).https://tokio.rs/tokio/tutorial/hello-tokio
That will at least help you break down the problem to locate the issue.
I don't know anything about Windows though. Maybe there's some per-thread setup that needs to be done in tokio's thread pool?
Same erro by using this approach.
Tokio works fine, by itself. windows-native-gui works fine, by itself. It is the combination that causes this issue.