5 ms·
Yes. Static pages can include frontend JavaScript, including WebAssembly + Pyodide. You'll likely just have a build step that produces the actual JavaScript bun
by samtheprogram 1y ago
Yes. Static pages can include frontend JavaScript, including WebAssembly + Pyodide. You'll likely just have a build step that produces the actual JavaScript bundle you'll be serving statically.
As for obsfucation, you could precompile to Python bytecode (.pyc files), and then to obsfucate that further you could e.g. pyminify before the bytecode compilation.
There's also pyarmor, but as of 2022 [1] that was unsupported.
[1]: https://github.com/pyodide/pyodide/discussions/2325 https://github.com/pyodide/pyodide/discussions/2325
- paulgb 1y agoUnfortunately even though WebAssembly assets can be served statically, you need certain headers to be set to use SharedArrayBuffer, which as far as I can tell is not possible on GH Pages[1]. Pyodide seems to use SharedArrayBuffer for at least some functionality. [1] https://github.com/orgs/community/discussions/13309 https://github.com/orgs/community/discussions/13309
- simonw 1y agoOh that's really disappointing. I've been loading Pyodide from a CDN so I hadn't noticed that. The one downside of GitHub Pages generally is the lack of custom header control - you can't serve proper HTTP redirects for example.