As mentioned, I would like to create a webassembly build for it. Background is, that we have restricted computer policies + with webassembly we are running in a sandboxed system. Also easier integrate able into our web application.
I would prefer having a 1:1 feature complete build, but ghutchis mentioned that he might wants different features for this port.
This thread is for deeper discussion, feel free to add wishes / requirements here before I would start porting it.
Thanks for the suggestion and offer - I’m very curious to see how a WebAssembly port would work. I think I have two concerns as far as WebAssembly:
it’ll need to be fairly modular because the underlying codebase is modular - and some plugins may not map well into a web view (e.g., auto-opt and some other features use threading)
the current design (esp. the edit tool) assume mouse use and I’d guess a WebAssembly port will get interest in e.g. tablet use in which touch gestures are much less accurate
But the best way to know is to give it a try and see what breaks.
Can you tell me a bit more about integrating into your web application? What do you have in mind?
I’ve used claude code for evaluation, seems to work pretty well in the browser.
(Needs to compile the dependencies to webassembly, e.g. core libs, then the application can be compiled. Python can also run in browser, but not with pip install)
I could open a PR, but I saw your no AI policy - so I would like to mark it as experimental AI solution.
Benefit would be, no installation needed anymore - as it runs in a sandbox in the browser.
(Could get just linked on github “Run App” → app opens in new browser tab → works)
Regarding the Touch Devices, Mac/Windows/Linux have the same scope, as touch devices exist.
=> I would keep it separate.
This looks cool. (Tim sent a screenshot of the app in a web browser window)
I’m not sure how much it’s worth hoisting avogadroapp completely. The app helps set up the window, but some of that seems irrelevant to "draw and edit molecules in the browser) vs. having the rendering space with tools elsewhere on the page.
I’d probably suggest that a webpage embedding should have its own buttons for the tools.
I don’t know enough about it, but I’d suggest something similar (e.g., a canvas space) for the tool options
On the build side, I’d probably add a CMake flag (which could be EMSCRIPTEN but could also be ENABLE_SUBPROCESS) to turn off the Python plugins entirely (e.g., don’t bother compiling those parts of qtgui or qtplugins/commands etc.)
EMSCRIPTEN should probably also turn off openbabel features - I know there’s an openbabel version but getting that right might be tricky
I know a few people who’ve asked about using Avogadro in Jupyter notebooks / JupyterHub, or on a cluster, so I can see a bunch of good use cases.
I’ll start in on more specific code review on Monday.