Replies: 1 comment 2 replies
-
Hello, did you ever find a solution to this? I am trying to implement grpc (client-side) into my bevy app |
Beta Was this translation helpful? Give feedback.
2 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Bevy!
I have an application that needs to serve a Tonic (gRPC) server and a Bevy app in one binary. They also need to be able to share data over threads (through Mutexes).
I have tried:
Spawning each through Tokio and Futures. This doesn't work, because winit warns against spawning itself from anything but the main thread, and requires a special configuration in order to enable it. I'm not sure how to ask Bevy to enable this configuration.
Spawning the server through a system using a thread pool and the
AsyncComputeTaskPool
example. A con with this is that the server never technically "ends" until the application is shut down, so I'll have a system that is infinitely running. But, even so, after trying, it doesn't seem to work - I can't connect to my server. It seems the system is erroring out because there is no Tokio reactor running.Here's the system I use for that:
Even if this solution works out, I'm still skeptical that it's the best one, because I don't love the idea of a system never ending one call.
Thanks for all the help I can get!
Beta Was this translation helpful? Give feedback.
All reactions