Giter Site home page Giter Site logo

qducasse / opensmalltalk-vm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pharo-project/pharo-vm

0.0 1.0 0.0 235.47 MB

This is the VM used by Pharo

Home Page: http://pharo.org/

License: Other

CMake 0.57% Shell 0.04% Objective-C 0.01% C 26.46% Smalltalk 72.89% PowerShell 0.01% Objective-C++ 0.01% Assembly 0.02%

opensmalltalk-vm's Introduction

Headless OpenSmalltalk-VM for Pharo

This is the branch of the Headless VM used for Pharo. This branch has the modifications required to run Pharo in a true headless environment. The image running on the VM is responsible of handling the UI and the events.

The image includes a default implementation of the handling of UI through the use of SDL2.

For more details about the whole Pharo VM project refer to our wiki.

This is a fork of OpenSmalltalk-vm. We are doing our best to keep compatibility and contribute back, as long as it fits the objective of Pharo community.

CI

This project is continuously built and test in the CI infrastructure located at:

https://ci.inria.fr/pharo-ci-jenkins2/job/pharo-vm/job/headless/

Building

For building the VM it is required the following set of tools:

  • A working Pharo
  • CMake (at least version 2.8.4)
  • CLang
  • Binutils (make and friends)
  • wget
  • unzip
  • automake
  • libtool

In Linux Fedora, it is needed to install libcurl and to create a symbolic link to alias such library with the name used by libGit. For doing so, it is required to do:

sudo ln -s /usr/lib64/libcurl.so.4 /usr/lib64/libcurl-gnutls.so.4

In Ubuntu 20.04 and in Mint 20, the VM is built with the following packages:

  • build-essential
  • gcc
  • g++
  • binutils
  • cmake
  • git
  • wget
  • unzip
  • uuid-dev
  • libssl-dev

Building in OSX / Linux:

We recommend to use out-of-source building. So, we are building in a different directory than the one containing the sources. To do so, we give both parameter for saying where the source is (-S) and where to build (-B).

$ git clone [email protected]:pharo-project/opensmalltalk-vm.git
$ cmake -S opensmalltalk-vm -B build
$ cd build
$ make install

Building in Windows:

The build in Windows, uses Cygwin. This tool should be installed, and the following Cygwin packages are needed:

  • cmake
  • mingw64-x86_64-clang
  • zip
  • unzip
  • wget
  • curl
  • make
  • git
  • libtool

To automate the Cygwin installation process there is scripts\installCygwin.ps1 which downloads and installs a chosen version of cygwin and mingw for a given architecture. For example the following installs the latest Cygwin (64 bit) and mingw64-x86_64-clang compiler:

.\scripts\installCygwin.ps1 setup-x86_64.exe x86_64

Do not forget to set the execution policy to Unrestricted (from the Admin PowerShell) in order to being able run the ps1 script:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Bulding the VM:

$ cmake .
$ make install

The VM is built from generated code and code written by hand. The generated code is the result of converting Smalltalk code into C. This conversion is performed during the cmake process.

This will generate the VM in build/dist/

VM flavours

By default the cmake build will build a CogVM, that is, a VM configuration with JIT compilation. Our cmake configuration accepts a FLAVOUR argument to specify different vm flavours to build, which you can use as follows:

$ cmake -DFLAVOUR=[your flavour] .

The accepted flavours for the moment are as follows:

  • CoInterpreterWithQueueFFI: VM including JIT
  • StackVM: VM with context to native stack mapping, without JI

In case of Problems

In case of problems with the build, please tell us including the following things:

  • Command executed
  • CMakeFiles/CMakeOutput.log
  • CMakeFiles/CMakeError.log
  • CMakeCache.txt
  • If you are using windows, please include the output of cygcheck -s

Source Directory Structure

The headless mode is developed on top of code of the Cog branch of Opensmalltalk-vm. The code that is used without changes is stored in the extracted directory. This allows us to easy integrate changes from and to the Cog branch.

The code that has been specially created or modified for this branch is stored in src / include and plugins.

  • smalltalksrc: includes the tonel repository with the code in Slang.
  • generated: here VMMaker will generate the VM code.
  • includes: All non generated includes required by headless mode
  • src: All non generated code required by headless mode.
  • extracted: This code is literally the same code base used in the normal OpenSmalltalk-VM build.
  • plugins: The code of the different plugins developed for headless mode.

Editing the VM code in your image

You can load the Pharo code of the VM using Pharo's git client Iceberg. You can do so by cloning directly this repository from Iceberg, or by adding an already existing clone to it.

Alternatively, if you're building the VM using the instructions above, the build process does already generate a Pharo image with the VM code loaded. You'll find such Image in the build/vmmaker directory inside your build directory.

opensmalltalk-vm's People

Contributors

eliotmiranda avatar tesonep avatar guillep avatar nicolas-cellier-aka-nice avatar estebanlm avatar clementbera avatar krono avatar timrowledge avatar ronsaldo avatar fniephaus avatar andreasraab avatar hogoww avatar johnmci avatar gettimothy avatar akgrant avatar sig avatar rmacnak avatar timfel avatar alisu avatar akgrant43 avatar lwassermann avatar codefrau avatar marianopeck avatar carolahp avatar syrel avatar piumarta avatar jecisc avatar zecke avatar vincentblondeau avatar kendickey avatar

Watchers

James Cloos 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.