I am trying to move my multiplayer bevy client to the web using webassembly. The server will still run natively, only the client should work from inside a browser.
When just running the same code in wasm I get an error on the line let socket = UdpSocket::bind("127.0.0.1:0").unwrap(); which makes sense, since opening raw sockets is not supported in wasm.
Is there a way to use bevy-renet with websockets instead? If so, are there any examples for this?
I imagine that this will lead to a bunch of problems, since the server then also needs to accepts websocket connections?
Is the idea of having native and webclients even feasible with bevy?
I guess it would be possible to run the wasm binary "natively" using something like wasmtime, correct?
Or is there already another library which magically solves all these problems?
Looking forward to your insights ;)