Warning
This post was published 34 days ago. The information described in this article may have changed.
I have 2 windows:
But things go wrong on macOS, because UI thread must only be on Main Thread. If I run one of them, main thread will be blocked, and another can have no place to be arranged.
What's worse, bevy based on winit while tauri based on TAO. It's hard to share the same window manager between them. And both have their own async runtimes, I may not able to use tokio::spawn_local to force them to run on main thread correctly.
So, the only method, I can come up with, is to use ipc-channel. However, it raises up the complexity to distribute and bundle my app.
If adopt this solution, I prefer the bevy be lauched by tauri, and contolled by tauri with ipc-channel.
(ps. the bevy part is hard to compile into wasm for it relies on OS api to capture screen)
Anyone knows a better way to solve this situation?
2 posts - 2 participants
🏷️ rust_feed