3 ms·
> My top choice for this kind of thing in 2025 is GitHub, using GitHub Pages. It's free for public repositories and I haven't seen GitHub break a working URL th
by behnamoh 2y ago
> My top choice for this kind of thing in 2025 is GitHub, using GitHub Pages. It's free for public repositories and I haven't seen GitHub break a working URL that they have hosted in the 17+ years since they first launched.
Does JS and Pyodide work on GH papges? Last I checked it only serves static pages.
Tangent: What if I want to release a Python project to the world but keep it closed-source? Can we obfuscate code in Pyodide?
- samtheprogram 2y agoYes. 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 2y 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 2y 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.