Webassembly C++ GUI <-> Native C++ application
Hi Guys
I'm planning to develop an application for a diagnostic tool. My basic idea is to create two process one that interacts with the hardware and one with the rich GUI implementation. Usually I use some kind of socket connection between the two processes and serialize/deserialize using some library like flatbuffers or msgpack.
I was wondering about implementing the interface with DearImGui and building with emscripten to let the UI run on the browser. This way I can use websockets to connect the two application parts.
Considering that I need to monitor many parameters, so text based formats like json are ruled out, has anyone suggestion or experience with protobuf like libraries in the webassembly platform?
4 comments · 92% upvoted · other discussions
If the UI part will always live in a browser, I think you'll be better of just using native browser rendering technologies (HTML / CSS / JS); you'll have a ton of libraries / building blocks to quickly stand it up (plus it will scale better to small / big screens).
If you plan to build the UI into native apps as well, especially that are designed to run in constrained environments, building the UI in some native technology that can also target emscripten might work, but expect a lot less building blocks and a lot more manual labor for standing it up (if the environments are not constrained, you can consider using something like - gasp - electron to wrap the web UI; it'll still be a lot cheaper / faster to build).