#tauri-websocket rust access
5 messages · Page 1 of 1 (latest)
Wait, you're wanting a socket connection between the WebView frontend and the Rust backend?
If so, I'd suggest against it. There's absolutely no benefit over using a combination of Commands and Events
You could even just use Events for this
If you needed to have dynamic connections for some reason (it'd be better to branch off the payload than to use a dynamic event ID), you can use { "kind": "AnyLabel"; "label": variable; }
https://beta.tauri.app/references/v2/js/core/namespaceevent/#eventtarget