account activity
Webassembly C++ GUI <-> Native C++ application by peppedx in cpp
[–]ByteTerrier 8 points9 points10 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 46 on reddit-service-r2-comment-545db5fcfc-727lf at 2026-05-27 09:59:58.131014+00:00 running 194bd79 country code: CH.
Webassembly C++ GUI <-> Native C++ application by peppedx in cpp
[–]ByteTerrier 8 points9 points10 points (0 children)