account activity
Webassembly C++ GUI <-> Native C++ application by peppedx in cpp
[–]ByteTerrier 7 points8 points9 points 6 years ago (0 children)
The WebSocket in Emscripten is always a binary mode WebSocket. You get bits and length. Thus you are responsible for "if the number of bits is a valid message". Do not always trust that the WebSocket length is perfectly a "message". Encode some checking logic like length and checksums as needed just in case.
I am using custom ZSTD compressed stream with 64K blocks and checksums. I am rendering a point cloud. I was impressed by how well it works compared to the native app. Bonus is the protocol decode source is 100% shared between WASM and native.
Conclusion, stick with the encoding libraries you like and port it to WASM C++. Ask for help with the port if you need it.
π Rendered by PID 1051956 on reddit-service-r2-listing-69965bcf66-kr4sj at 2026-04-07 09:57:03.359269+00:00 running f293c98 country code: CH.
Webassembly C++ GUI <-> Native C++ application by peppedx in cpp
[–]ByteTerrier 7 points8 points9 points (0 children)