#Streaming pty stdout/stdin

1 messages · Page 1 of 1 (latest)

untold jungle
#

Hello all. I've had some success with launching a process in its own pty and displaying the results with xtermjs on the frontend. However, I'm using emit and commands to read and write the streams and so incur the serde cost.

xtermjs supports websockets, however, which could/should eliminate the need to serialize. Can anyone recommend a way to implement this? I could spin up a websocket server but then I have a port listening on my box. Is there a way to avoid this?

Thanks in advance for any tips.

fleet seal
#

I could spin up a websocket server but then I have a port listening on my box
Well, no. I don't think you can have a websocket without well, a websocket if you get what i mean. Like websocket servers really aren't too different from "normal" http/tcp servers.

untold jungle
#

Fair enough - I keep seeing reference to "local servers" so was wondering whether that was something tauri-specific.

#

could there also be some way to do it with a custom protocol?

fleet seal
fleet seal
untold jungle
#

I know just enough rust to not know whether that will be difficult or not, so I’ll give it a go 😂

#

(Though should try the server approach first as that should let me know whether emit etc is the “bottleneck”)