Basic Impl
- Desktop support with websockets library. Runs a background thread to receive / send events, client does not need to block as it is send+sync - Wasm support with wasm-sockets library. Uses an exclusive polling system at the end of each frame due to client not being thread safe (+ lack of threads) - Send and receive messages
Showing
- .gitignore 2 additions, 0 deletions.gitignore
- Cargo.toml 20 additions, 0 deletionsCargo.toml
- src/desktop.rs 208 additions, 0 deletionssrc/desktop.rs
- src/events.rs 37 additions, 0 deletionssrc/events.rs
- src/lib.rs 42 additions, 0 deletionssrc/lib.rs
- src/wasm.rs 180 additions, 0 deletionssrc/wasm.rs
.gitignore
0 → 100644
Cargo.toml
0 → 100644
[package] | |||
name = "remote_events" | |||
version = "0.1.0" | |||
edition = "2021" | |||
[dependencies] | |||
serde = { version = "1.0.140", features = ["derive"] } | |||
thiserror = "1.0.31" | |||
log = "0.4.17" | |||
[dependencies.bevy] | |||
version = "0.7" | |||
default-features = false | |||
features = [] | |||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] | |||
websocket = { version = "0.26.5" , default-features = false, features = ["sync", "sync-ssl", "bytes", "native-tls"]} | |||
[target.'cfg(target_arch = "wasm32")'.dependencies] | |||
wasm-sockets = "0.2.2" |
src/desktop.rs
0 → 100644
src/events.rs
0 → 100644
src/lib.rs
0 → 100644
src/wasm.rs
0 → 100644
Please register or sign in to comment