Git Product home page Git Product logo

rsqueak's Introduction

RSqueak

A Squeak VM written in RPython.

Setup

Required Projects

You need three repositories:

  • This one
  • pypy/pypy
  • pypy/rsdl
    • Alternatively download RSDL package from PYPI
    • Then unpack and install it using python setup.py install or pypy setup.py install

Required packages

You need the following packages on your OS. Install with your favorite package manager:

  • pypy
    • For faster translation of the RSqueak VM. Alternatively use default Python.
  • libsdl-dev
  • libffi-dev

Adjusting the PYTHONPATH

In order to allow the RPython toolchain to find the rsdl and pypy packages you have to add the two folders to the PYTHONPATH.

If you are using the rsdl repository, you have to add the rsdl subfolder of the rsdl repository to the PYTHONPATH.

export PYTHONPATH=${PYTHONPATH}:.:[path/to/pypy]:[path/to/rsdl]

Setting the SDL Driver

For testing the basic functionality of the VM you might want to disable the UI. You can do so by setting the SDL_VIDEODRIVER environment variable to dummy.

export SDL_VIDEODRIVER=dummy

Building & Tests

Execute the following commands inside the main directory of this repository.

To build the VM:

[path to pypy repository]/rpython/bin/rpython targetimageloadingsmalltalk.py

To build the VM with enabled just-in-time compiler:

[path to pypy repository]/rpython/bin/rpython -Ojit targetimageloadingsmalltalk.py

To run the tests (most do not require building):

[path to pypy repository]/pytest.py [--slow|--quick] spyvm/test

Starting an image

The build process will produce an executable called rsqueak. The image/ directory contains two images you can open with the following. Use --help to see command line switches.

./rsqueak images/mini.image
./rsqueak images/Squeak4.5-noBitBlt.image

STM-enabled Rsqueak

This is a branch of RSqueak which incorporates the RPython STM transformation. Most of the initial code base comes from the results of a project seminar. The stm-gc-c7 branch is based on this version and the 64bit branch.

Setup for stm-enabled RSqueak

You can see the current state of the integration of the RPython STM in the stm-gc-c7 branch. Beware that you can only build this branch if you have a 64-bit Linux. To build this branch you have to setup several things:

  1. Change your local pypy repository to the stm-gc7 branch, commit dd3c06b
  2. Get a clang which has (the required patches). If you have a Debian-based OS you can use the following package: llvm-pypystm.

To build, use the following command:

[path to pypy repository]/rpython/bin/rpython --gc=stmgc targetimageloadingsmalltalk.py

rsqueak's People

Contributors

lwassermann avatar antongulenko avatar timfel avatar cfbolz avatar krono avatar arigo avatar codezeilen avatar

Stargazers

Jakob Reschke avatar

Watchers

Jakob Reschke avatar James Cloos avatar Sven avatar Patrick avatar Sebastian Gerstenberg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.