The Wayback Machine - https://web.archive.org/web/20211219061433/https://github.com/progval/pythonvm-rust
Skip to content
master
Switch branches/tags
Code

Latest commit

* Start supporting wordcode.

* Named arguments are better.

* Fully debug wordcode.

* Support extended opcodes.

* Add NOPs again, to fix the numbering.

* Fix previous commit.

* Various stuff.

* Working on 3.6 support...

* Fix indent.

* Fix SetupExcept.

* Implement CallFunctionKw.

* Fix test to use Python 3.6 bytecode.
311420a

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

pythonvm-rust

Build Status

A Python virtual machine, written in Rust.

Features

  • prints strings to stdout
  • basic exceptions
  • for loops
  • functions, positional arguments, keyword arguments, *args, **kwargs
  • useable as a library
  • a fine-grained sandbox

Goals

  • Compatible with CPython 3.6's bytecode, in order to take advantage of FAT Python
  • Support CPython's implementation of the standard library
  • No crash, even when messing with code objects
  • Bytecode optimizations at runtime
  • Less bounded by the GIL than CPython

Dependencies

  • CPython 3.6 (used as a parser and bytecode compiler).
  • Rust
  • Cargo

Try it

  1. git clone https://github.com/ProgVal/pythonvm-rust.git
  2. cd pythonvm-rust
  3. python3 -m compileall -b pythonlib examples
  4. cargo run pythonlib/ examples/helloworld.pyc