To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 891a4300 authored by John Zhang's avatar John Zhang
Browse files

Merge branch 'mu-rewrite' into mu-rewrite-debug-pypy-mod

parents 7b87d30a f7e54287
===================================== ==============================
PyPy: Python in Python Implementation PyPy-Mu: A Mu Backend for PyPy
===================================== ==============================
Welcome to PyPy! Welcome to PyPy-Mu!
PyPy is both an implementation of the Python programming language, and PyPy-Mu is a fork of `PyPy <>`__ that aims to
an extensive compiler framework for dynamic language implementations. add a `Mu Micro Virtual Machine <>`__ backend for it.
You can build self-contained Python implementations which execute
independently from CPython.
The home page is: This project is currently under active development,
right now we can compile PyPy interpreter with `--no-allworkingmodules` option. Building
If you want to help developing PyPy, this document might help you: Obtaining a Mu implementation
----------------------------- The reference implementation (Holstein) for Mu can be found `here <>`__.
Build the Mu implementation, make sure to build the C binding as well.
The fast implementation (Zebu) for Mu can be found `here <>`__.
This implementation is still in progress.
It will also point you to the rest of the documentation which is generated Reference implementation is targetted by default.
from files in the pypy/doc directory within the source repositories. Enjoy You can specify which implementation to target using the flag ``--mu-impl=<impl>`` to RPython.
and send us feedback!
the pypy-dev team <>
Setting up environment variable
.. role:: bash(code)
:language: bash
Building RPython Mu API binding requires ``$MU_HOLSTEIN`` and/or ``$MU_ZEBU`` environment variable to be set.
======== You need to set them to point to the cloned Mu implementation repository.
Compiling & Executing RPython Target
Specify :bash:`-b mu` option to compile using the Mu backend:
$ rpython/bin/rpython -b mu <target>
This builds the program bundle and dumpts out a boot image as ``<target>-mu`` in the current directory.
The nature of the boot image is implementation defined.
Currently for Holstein, it is a zip file; for Zebu, it is a binary executable.
Note the default Mu code generation backend is API (building bundle through API calls).
This back-end can be slow for compiling larger RPython programs.
An alternative is caching the calls into C sources, and run from there (remove the overhead of RPython FFI).
To specify the code generation back-end, use the flag ``--mu-codegen=<backend>``, which takes ``c`` or ``api``.
To run the dumped boot image under Holstein, use the `` shell script.
$ $MU_HOLSTEIN/tools/ <mu-flags> <bootimage> <program-args>
build with: --------------------------
.. code-block:: console Why not try compiling the PyPy interpreter (currently with some limitations)?
$ rpython/bin/rpython -Ojit pypy/goal/ ::
This ends up with ``pypy-c`` binary in the main pypy directory. We suggest $ PYTHONPATH=$PYPY_MU pypy rpython/bin/rpython -O3 -b mu --mu-vmargs='sosSize=780M\nlosSize=780M' --mu-codegen=c --no-shared $PYPY_MU/pypy/goal/ --no-allworkingmodules
to use virtualenv with the resulting pypy-c as the interpreter; you can $ $MU/tools/ --staticCheck=false --sourceInfo=false --vmLog=ERROR --sosSize=780M --losSize=780M $PYPY_MU/pypy/bin/pypy-mu
find more details about various installation schemes here: Note: when building the pypy interpreter, put the boot image under pypy/bin, so that PyPy can initialise the path correctly.
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment