#bevy #wry #bevy-plugin #cross-platform

bevy_wry

A tauri-apps/wry integration with Bevy engine

7 releases

0.1.6 Feb 23, 2024
0.1.5 Feb 22, 2024
0.1.0 Jan 25, 2024
0.0.1 Feb 18, 2024

#689 in GUI

Download history 519/week @ 2024-02-17 77/week @ 2024-02-24 6/week @ 2024-03-02 4/week @ 2024-03-09 55/week @ 2024-03-30 8/week @ 2024-04-06

327 downloads per month

MIT license

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

Dependencies

~22–65MB
~1M SLoC