📅 2026-09-25
The other day, yesterday morning to be exact, I was thinking it would be pretty neat if Lagrange could be compiled with Emscripten so it could run locally as a web page.
I am no fan of bloated web browsers nor am I particularly fond of the web in general, but unfortunately it is THE mainstream computing platform nowadays. Any modern gadget that cannot access the web seems a bit pointless — detached from the real world, in a way. I have never felt a particular drive to learn web technologies beyond the basics of the classic LAMP stack and JavaScript. The myriad client-side frameworks frankly seem repulsive. There is so much constantly evolving complexity building on itself that it seems a waste of time to really get into it seriously. Knowledge and skills become outdated after a year or two. That being said, one can't deny that the web in 2026 is a capable and versatile platform for implementing many kinds of software. It is particularly useful when it comes to cross-platform apps, as demonstrated by how widespread Electron has become. A core tenet of the web is that it is a platform unto itself, providing the same environment regardless of the underlying hardware. This part I do appreciate even if in practice the implementation is far from ideal.
A big design goal of Lagrange is that it is cross-platform, able to run pretty much anywhere. So far this has meant macOS, Linux, Windows, Net/Free/OpenBSD, Haiku, iOS, Android, a handheld game console, and even the terminal through Curses. You may note that one huge platform has been missing from this list: the Web.
Would it even make any sense to run Lagrange as a web app? Technically speaking, not really. It would be slower, use more memory, and be contained into the browser's sandbox, unable to make direct network requests to Gemini servers. But web apps do have advantages, too: no need to install anything, no need to upgrade, and ubiquitous access from any (compatible) browser. In certain environments, let's say a company-issued laptop where you are bound by ZScaler and umpteen different software management policies — a random, purely hypothetical example — a web app may start to feel attractive.
Be that as it may, I still have no time or inclination to dive into web programming to port Lagrange to the web.
At least, not if I do it manually.
I was still curious enough about this, and since I do get a kick out of seeing Lagrange running on any and all platforms, I asked ✨AI✨ to do this for me: compile Lagrange using Emscripten and set up a secure WebSocket relay so the app can actually fetch content, like a real app would.
I have it available here:
It supports the desktop, tablet, and phone UI variants (autodetected), so you will get a different experience when using your desktop browser vs. mobile browser.
I'm actually quite amazed how well the app works as a WebAssembly executable. Big kudos to SDL for their Emscripten support! That is a crucial part of why this works in the first place.
This is an early build of Lagrange v2.0, meaning the changes so far are mostly under the surface: SDL3 migration, refactorings, and cleanup. Version 2.0 is mostly about this kind of restructuring, but I think a few user-facing features will appear at some point.
In most cases, using the native Lagrange is obviously the better choice, but if anyone new to Gemini wants to quickly see a demo of Geminispace, or show Gemini to someone (or maybe play a bit of SpellBinding during a meeting, hypothetically), it's difficult to beat the convenience of a visit to https://lagrange.skyjake.fi/.
CC-BY-SA 4.0
The original Gemtext version of this page can be accessed with a Gemini client: gemini://skyjake.fi/gemlog/2026/09/emscripten-lagrange.gmi