Re:Show HN: Slint - A Declarative UI Toolkit Written in Rust...
by nu11ptr on Monday June 19, 2023 @01:26PM
(#36393904)
Pros and cons: with a pipe it will be up to you to create your own message delimiters and protocol, so a pipe is somewhat lower level. You also limit comm. to just that machine, but that may be a pro if that is what you are looking for (omits need for things like username/password or locking to 'localhost'). Lastly, you do not gain an API for your users to consume (if that makes sense for your app - it doesn't always).
[ Parent
| on HN ]
Re:Show HN: Slint - A Declarative UI Toolkit Written in Rust...
by monroewalker on Monday June 19, 2023 @10:26PM
(#36399002)
Protoc actually generates "writeDelimitedMessage" and "readDelimitedMessage" functions for each type. The only thing I needed to add was some buffering on the Dart side to ensure the full message was available. The Go side was able to read the stream and block until input became available
Re:Show HN: Slint - A Declarative UI Toolkit Written in Rust...
by nu11ptr on Tuesday June 20, 2023 @07:36AM
(#36402591)
Interesting - so you are using protobuffer encoding over a named pipe?
Re:Show HN: Slint - A Declarative UI Toolkit Written in Rust...
by monroewalker on Tuesday June 20, 2023 @11:11AM
(#36405154)
Yes but just over stdin/stdout since I'm creating the backend as a subprocess. Not sure if it makes more sense to have the backend be the parent and the flutter app be the subprocess but this is working so far.