Crates.io | bevy_websocket_adapter |
lib.rs | bevy_websocket_adapter |
version | 0.1.5 |
source | src |
created_at | 2021-10-07 15:24:24.647946 |
updated_at | 2021-10-10 22:19:09.14113 |
description | Simple adapter to receive WebSocket messages in your bevy games as native Rust types. |
homepage | https://github.com/Xide/bevy-websocket-adapter |
repository | https://github.com/Xide/bevy-websocket-adapter |
max_upload_size | |
id | 461828 |
size | 86,477 |
Simple adapter to receive WebSocket messages in your bevy games as native Rust types.
:construction: | This is a work in progress, many major features are not implemented |
---|
It uses tokio
as the async backend and tungstenite
for websocket protocol implementation.
You can check the examples
directory for more details on the usage of this crate.
All websocket messages must be JSON object in this format:
{
"t": "MyMessageType",
"d": "..."
}
:warning: | The t field MUST be unique across all your messages types, one value of t will always map to the same native rust type. |
---|
The contents of d
can be any valid JSON value. Your native rust type must be able to serialize/deserialize the contents of d
using the serde_json
crate.