After having some success getting my early QBasic programs running in the browser I had a bit of a look this morning to see if I could do the same for my Delphi apps. I found a project called BoxedWine which looks promising. Seems to be a minified version of Wine that that runs in browser using WASM.
I downloaded the example and had a bit of a play around with a Tetris clone I built. It worked… to a degree. It was a little slow, and some of the colours were off. But it ran, and was actually usable.
![A screenshot of a Win32 Tetris clone running with BoxedWine running in Safari](https://cdn.uploads.micro.blog/25293/2023/screenshot-2023-09-29-at-10.06.38-am.png)
I did another test with an app that used OpenGL, which was less successful.
![A Windows style exception message indicating a null pointer running in Safari](https://cdn.uploads.micro.blog/25293/2023/screenshot-2023-09-29-at-10.06.08-am.png)
I think some of the OpenGL shared objects are not in the minified Wine distribution it was using. It might be possible to include them: there are instructions, and a few demos, on how to load files from the full Wine distribution on demand.
Anyway, not sure if I’ll pursue this further but it was a fun little exercise nonetheless. I’m pretty impressed that this is even possible at all. The Web stack is pretty freaking awesome.