Pharo Smalltalk now runs entirely in your browser via WebAssembly

Pharo in the Browser with WebAssembly

Massimo Nocentini has brought the Pharo Smalltalk environment to the web with a WebAssembly-based VM. You can boot Pharo 13.1, 14, or 15 images directly in the browser, drop in your own .st, .zip, or .image files, and save images locally so they persist between visits. A built-in console offers a Smalltalk REPL, and Git and Metacello operations route through a configurable proxy.

The proxy sees the code and any credentials that pass through it, so choose only one that you run or trust.
  1. jsrcout

    I still remember the Byte issue on Smalltalk from 1981 [0]. To high school me it was The Future for sure. It looked so cool. I had no way to try it on the family Apple II+ [1] though.

    Trying out various Smalltalk-family systems in recent years showed the advantages of implementing the entire system in one language and running it in one image. There's a refreshing coherence and predictability to everything, and pervasive simplicity instead of fractal complexity.

    You can browse the entire codebase in a single window - language/compiler, math operations (except for the base primitives I believe), data structures, graphics, window system, all nicely organized. Methods, even critical ones, are mostly small, straightforward, and cruft-free. Many are just a line or two.

    Smalltalk gives the developer immense power. You work directly "in the code"; your changes are live instantly. You can trivially modify the system itself - just go there and start typing. All in the same browser window. You can easily look inside any running program, change its data and even its code, and just keep going. Even now it feels futuristic.

    You get powerful graphics and a window system out of the box instead of the usual story where you select OpenGL/Vulkan/GUI/DOM libraries and configure tools like make/rpm/docker/pip/npm. That's probably the most "science fiction-y" aspect by far.

    In short, this was the "Jetsons" future that seemed possible back when I was getting started. The future we actually got, of […]

  2. pmkary

    Can't believe what I'm seeing with my own eyes that Pharo is this fast, on a browser, on a mobile. I mean I get it that things have advanced and so much more insane things are out there (like running OS X Tiger with Infinite Mac, or SketchUp web, or...) but this still shocks me. Tech is advancing too fast for my monkey brain to pace with.

  3. lynndotpy

    I played around with Pharo some time in 2017 or 2018, making a Minesweeper clone in it.

    I really _really_ like environments where rapid and immediate iteration is possible, especially for any project with any artistry or exploration in its construction. One thing is that (in some cases) you see intermediate, emergent, or unintended results you'd not have seen otherwise.

    Although not a particularly interesting unintended result, a logic problem (iirc) had the Minesweeper expand happen with each action (i.e. propagating cleared cells with each step rather than in an instant).

  4. ajasmin

    Nice!

    So I assume this is the byte code interpreter compiled with Emscriptem? Didn’t Squeak have a similar try it out page?

    I would assume there’s no attempt at Jitting or pre-compiling some of the image code, which would be a feat given Smalltalk dynamic nature and webassembly limited execution model.

    I was hopping to have something like this to play with. How can you build the code?

  5. Cieric

    I've never used Pharo before, but in my firefox it renders up and to the left too much. I'm not sure how the mouse is translated to the canvas but it seems like there is an issue with it (or vice versa and it's the weird canvas scaling). Removing `transform: scale(calc(1 / var(--world-dpr, 1)));` from the canvas css seems to fix it for me though.

More from this day

2026-11-11