donalffons / opencascade.js

Port of the OpenCascade CAD library to JavaScript and WebAssembly via Emscripten.
https://ocjs.org/
GNU Lesser General Public License v2.1
582 stars 85 forks source link

Project Maintenance Status? #273

Open jteppinette opened 3 months ago

jteppinette commented 3 months ago

Does anyone know the maintenance status of this project. Is it time to investigate a fork since there hasn't been a published release in a year, and it is beginning to lag significantly behind OCCT.

goswinr commented 3 months ago

I wonder too, these two forks are ahead of master: https://github.com/TheTechCompany/opencascade.js https://github.com/ashmna/opencascade.js

clinuxrulz commented 6 days ago

Another way forward to allow us to use the most recent version of OCCT is to design a web worker in C++ that your web app talks to using emscripten and OpenCascade (C++ version) and only embind/expose your message processing function for your web worker instead of exposing the entire opencascade API. The message processing function is just a function that takes a string and returns a string.

The final wasm build from emscripten would then only contain the wasm code for the opencascade methods (and their dependencies) you touched in your message processing functions for your web worker. (Smaller wasm file.)

clinuxrulz commented 6 days ago

Here a sample for reference:

https://dev.opencascade.org/doc/overview/html/occt_samples_webgl.html

You'd just need to be happy with writing your Web Worker in C++ is all.

clinuxrulz commented 1 day ago

This is what I mean:

https://github.com/clinuxrulz/psf-toolbox-occt-webworker/blob/main/main.cpp

Rather than make your web worker in JavaScript/Typescript and embind/ffi a hundred thousand functions. Just write your webworker in C++ using the latest official opencascade, then compile it all to wasm using emscripten and only embind/ffi the one function that takes and returns a string (std::string process_message(std::string message);)

The file size went from a 50mb wasm down to a 30mb wasm. The wasm file will auto-shrink to only include what functions process_message depends on, and you still get full access to everything in opencascade while coding.