7 releases
0.1.6 | Feb 23, 2024 |
---|---|
0.1.5 | Feb 22, 2024 |
0.1.0 | Jan 25, 2024 |
0.0.1 |
|
#696 in GUI
63 downloads per month
34KB
397 lines
About
'bevy_wry' is a bevy plugin that provides integration with wry - cross platform webview rendering library written in rust.
'bevy_wry' enables bevy::Event based communication with WebView through websocket.
It is still in very early stages, however I think it is good enough for some experimentation.
Each client is simply reading/writing to websocket in a thread through MessageBus
. The 'websocket.read()' call is non blocking - current version is relying on TcpStream::set_non_clocking(true)
, however this will be improved in the future, as current implementation is quite expensive.
You can read events incoming from websocket with EventReader<InEvent<T>>
and write events with EventWriter<OutEvent<T>>
.
Example
Check the simple example for a quick reference.
cargo run --example simple --features="bincode bevy/bevy_core_pipeline bevy/bevy_render bevy/bevy_sprite"
Features
bincode
- default bincodeSerializeMessage
andDeserializeMessage
for types that implement/deriveserde::Serialize
andserde::Deserialize
.
Dependencies
~21–67MB
~1M SLoC