Replies: 1 comment 2 replies
-
I'm not really sure what you're asking. Is the question: Is it possible to use websockets in the browser with Leptos? (Yes.) Is it a good idea to ship Tokio to the browser? (Probably not, but I guess depending on the circumstances--if initial loading time doesn't matter, then sure) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hiya,
We've been looking into bringing HardLight client support into WASM. It's currently built with Tokio, so we're thinking of shipping it with a stripped down version of Tokio which it heavily depends on.
HL uses WebSockets to connect to an RPC server. The WebSocket is then used for both RPC requests and real-time server controlled events. Our plan is to use Leptos for our web app, and ship a HL client in it.
I think Leptos is a good option for this because of its reactivity, which means (as long as it works) much of the real time functionality is awaiting new events from the Hardlight client over a Tokio channel, then writing to signals.
From your experience in Leptos, is this possible? If not, how would we make this possible? Looking forward to the discussions.
Beta Was this translation helpful? Give feedback.
All reactions