TUI: Embedded backend mode
What was the envisioned plan regarding this issue?
The easiest way would probably be to run a goroutine that starts the backend server and make the TUI goroutine connect to its socket. It feels a bit strange to exchange data between goroutines over the system's socket API but it would at least simplify the setup of gomuks terminal quite a lot.
Maybe a better version would use the net.Pipe to make the connection between the two goroutines more direct?
I think that I would like to try to implement the first solution soon, what do you think about it?
It'll just call the functions directly rather than using any networking
So completely replacing pkg/rpc/client with pkg/hicli? I agree that it would be ideal, but also a lot more work, and I don't think that I will have enough time for this, so it would be completely up to you.
No, only pkg/rpc would be replaced, not the client. Perhaps even only the Request method and not the rest of the struct
OK I get it, makes sense. But to me it still looks more complicated than running the server in a goroutine. As you plan on keeping the pkg/rpc/client abstraction, I think I will experiment with my proposition as a first step that could be optimised later. The performances will not be worst than currently and it would already make the setup a lot simpler.