bevy_wry

Crates.iobevy_wry
lib.rsbevy_wry
version0.1.6
sourcesrc
created_at2024-01-25 10:58:44.558132
updated_at2024-02-23 19:12:17.126185
descriptionA tauri-apps/wry integration with Bevy engine
homepage
repositoryhttps://github.com/PawelBis/bevy_wry
max_upload_size
id1113682
size125,498
Paweł Bis (PawelBis)

documentation

README

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 bincode SerializeMessage and DeserializeMessage for types that implement/derive serde::Serialize and serde::Deserialize.
Commit count: 0

cargo fmt