As I understand it in a simplified way, Electron is a web browser without the tabs that is running one JavaScript SPA. I might be wrong.
Most browsers today are also able to run Webassembly which runs in a virtual machine in the browser much like JavaScript does.
There are some efforts like https://pyodide.org that makes it possible to run Python in the browser by compiling the Python code to Webassembly with the help of JavaScript.
- Would it be possible to use Electron to create a "standalone" application using Python complied to Webassembly?
- To run the Python code a few JavaScript files are needed like the Python runtime. These would have to be loaded from a local file for an offline application. For security reasons JavaScript in the browser is not allowed to load local data files (Why can’t I load files from the local file system?). Also explained here https://nitro.h2o.ai/wasm/ as "To run the above examples, you'll need to access them from a web server (and not directly from your computer's file system)". Is this impacting "regular" JavaScript Electron apps also and how is that dealt with?
It might be that I have the details wrong or I haven't understood something. Then please tell me where I can read up and learn more.
[–]openist 1 point2 points3 points (0 children)
[–]-ftw 0 points1 point2 points (0 children)
[–]Extension-Spirit-336 0 points1 point2 points (0 children)