A Squeak VM in JavaScript


SqueakJS executes Squeak in a web page. It is a fully capable virtual machine implemented in pure JavaScript running unmodified Smalltalk images. Squeak is a modern implementation of Smalltalk, the original dynamic object-oriented programming environment. It runs on virtually any platform, and now in the web browser, too. SqueakJS aims to be able to run any Squeak, from the oldest 1996 version to modern ones, as well as other Squeak-derived Smalltalks like Pharo or Cuis.

You can try SqueakJS right now: Mini Squeak is a very old stripped-down but fast version, or the full-blown Etoys and Scratch applications. Even the 3D environment Croquet runs in SqueakJS. Also interesting might be the Lively Squeak debugging interface I initially used to develop SqueakJS.

But even more interesting is running your own Squeak images: you can drop a Squeak image from your computer into the Launcher page, or construct a URL to have it run an image from your web server. There are runnable links to various Smalltalk versions on that page, too. Or build your own web app, perhaps using the JavaScript bridge.

Contributions are very welcome! Please report issues in the bug tracker. For discussion on how to use SqueakJS in your own project please use the Squeak mailing list. SqueakJS implementation details are better discussed on the vm-dev mailing list. You may also join the #squeakjs channel in the Squeak Slack.

-- Vanessa Freudenberg


June 2024 Release 1.2.2 makes copy/paste menu items work on mobile

May 2024 Release 1.2.1 adds virtual cmd button, fixes touch events

March 2024 Release 1.2.0 adds FFI and MIDI plugins, JIT for Sista bytecodes, JPEG write prim, fixes keyboard input, copy/paste, scroll wheel, highdpi, allows ES6 in source

November 2023 Release 1.1.2 with more fixes (thanks to Agustin Martinez for narrowing down the problem).

November 2023 Expanded the High-performance JIT Mockups.

October 2023 Release 1.1.1 with minor fixes.

October 2023 Release 1.1.0 with fixes and ability to save Etoys projects (finally!).

September 2023 Release 1.0.6 with minor fixes (thanks to Erik Stel).

November 2022 Release 1.0.5 with fixes, in particular to run Squeak 6.

May 2021 Release 1.0.4 with minor fixes.

April 2021 Published some Advanced JIT Mockups with ideas for higher performance.

March 2021 Release 1.0.3 with fixes, and pre-loaded JSBridge in the demo image.

February 2021 Release 1.0.2 has a new one-way become prim (Christoph Tiede) and JIT-compiles Array at:/at:put:

January 2021 Release 1.0.1 fixes some primitives to properly pop the stack

December 2020 Release 1.0: 🥳 64 bit support for Spur images by Vanessa, and Sista bytecode support by Fabio Niephaus

December 2020 The Computer History Museum announced Dan Ingalls' Smalltalk Zoo, built in part using SqueakJS

June 2020 All five issues of the 2001 SqueakNews ezine are now viewable using SqueakJS

June 2020 Release 0.9.9: JSBridge additions (Bill Burdick), fixes, renamed "master" branch to "main"

January 2020 Release 0.9.8: split source code into modules (thanks to Erik Stel), fixes (Craig)

January 2019 Release 0.9.7: bug fixes (thanks to Pavel Krivanek)

September 2018 Craig Latta and Vanessa Freudenberg win the 2nd price in the ESUG Innovation Technology Awards for SqueakJS-based Caffeine.

March 2018 Release 0.9.6: mostly bug fixes. Thanks to David T. Lewis and Jeff Sparkes.

November 2016 Release 0.9.5: unit testing on Travis (thanks to Fabio Niephaus), bug fixes by Craig Latta.

October 2016 Release 0.9.4: bug fixes

September 2016 Release 0.9.3 adds an incremental GC providing about 5x speedup for allInstances or become, Cog-style primitive error codes.

August 2016 Release 0.9.2: add virtual keyboard on iOS. Fabio Niephaus contributed a SpeechPlugin, check out his demo on the Launcher page.

August 2016 Release 0.9.1: bug fixes

July 2016 SqueakJS 0.9 released: Spur images can be loaded and stored. Fabio Niephaus contributed networking support for http and https connections making e.g. Monticello work. Images can now be passed in a zip file, so we can link to archives directly (e.g. Squeak 5.0). This also required CORS proxy support (shout out to Connor Hudson at crossorigin.me).

January 2016 SqueakJS 0.8 released: fixes

December 2014 SqueakJS 0.7 released: Support weak references and finalization, add JavaScript bridge, and new launcher page

November 2014 SqueakJS 0.6 released: Generate plugins from Slang code. Support file templates, and passing arguments via URL.

October 2014 SqueakJS 0.5 released: Adds a simple, fast-compiling, non-optimizing JIT compiler. Makes it quite a bit faster, but at the expense of memory (mobile devices may be better off without it).

September 2014 SqueakJS 0.4 released: Supports event-based input, and many older primitives. Can run Scratch, and the oldest Squeak 1.1 image.

August 2014 SqueakJS 0.3 released: Adds closure support, and full-screen. Runs a current Squeak image (4.5).

July 2014 SqueakJS 0.2 released: Has file support and WarpBlt. Can run an Etoys image now, and includes the beginnings of a Balloon plugin to make TrueType fonts work.

April 2014: Here's what Dan and I have been working on: Resurrecting Smalltalk-78. The VM is based on SqueakJS. I will start porting many improvements back to here.

January 2014 Need to stop working on SqueakJS for a while—but this VM tech will be put to good use, promise!

December 2013 Release 0.1: Runs mini.image successfully.

November 2013 Project started (after seeing Dan's Smalltalk-72 emulator at Hackers).