project 11 / 31
Gmsh in the Browser
Gmsh compiled with Emscripten to run client-side - meshing real geometries in the browser with an interactive 3D workspace, no server needed.
About this project
Running C/C++ code on the client side with Emscripten - used extensively with libraries ranging from small utilities to large codebases like Gmsh (OpenCascade and OpenBLAS next).
Even with intricate data types and complex structures, it handles them in the browser seamlessly and performance is good.
Experimented with both embind and standard exports. Avoiding bindings gives much more control but requires discipline - the golden rule is simple: create, use, and free the memory.
Managing memory manually in the browser takes a bit of extra effort, but the performance and control are worth it.
Note: This project needs a lot of tuning, for large meshes.