C Smalltalk Assembly C++ Objective-C Makefile Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Pharo VM

Download Build Status Windows Build status

Development fork(s)


The build relies on a valid gcc, cmake and 32 bit headers installation:

Building the VM

  1. Download the sources from github
git clone --depth=1 https://github.com/pharo-project/pharo-vm.git
cd pharo-vm

Note the windows specific steps mentioned in the win32 readme.

  1. Get a fresh pharo image from the build server by running the script in the image folder.
cd image && ./newImage.sh
  1. generator.image now contains VMMaker with the Slang sources, plus a workspace with some example VM configurations. In case there is no workspace, open one and paste the line you need. Pick or edit the configuration you want, then evaluate it (Do It).
PharoVMSpur32Builder buildUnix32.
PharoVMSpur32Builder buildMacOSX32.
PharoVMSpur32Builder buildWin32.

See startup.st for more examples for the common platforms.

As an alternative, try (Windows flavor shown):

./pharo generator.image eval 'PharoVMSpur32Builder buildWin32'

Should you want to build a StackVM version, use the PharoSVMSpur32Builder.

  1. Once the sources are exported, you can launch cmake and build the VM:
cd ../build
bash build.sh

Before doing that, you would be well advised to make a tar or zipfile of the whole folder in case you encounter a compilation/resources download problem as doing the whole process above is quite long.

  1. Finally, run the freshly compiled VM from results.

Building for iOS

Information on how to build a VM for iOS can be found here.

Building the VM from an IDE

If you want to build the virtual machine from an IDE, you could ask cmake to generate the IDE project for you. At step 4, instead of calling build.sh, you can run:

cd ../build
if [ ! -e vmVersionInfo.h ]; then
cmake . -G Xcode

It will generate a project for Xcode. Other options are available like Visual Studio. Then open the project from your IDE and compile from there.


The Pharo VM is a flavour of the Cog VM, a new and fast VM for Pharo, Squeak and Newspeak. It implements context-to-stack mapping, JIT (just in time compiler), PIC (polymorphic inline caching), Multi-threading, etc.

For more data about the Cog VM, please visit the offical Cog website