Skip to content

An incomplete stackless interpreter of Python bytecode, written in Rust.

License

Notifications You must be signed in to change notification settings

progval/pythonvm-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7c92dd6 · Feb 18, 2023

History

71 Commits
Apr 17, 2016
May 21, 2016
May 8, 2016
Oct 29, 2017
Oct 29, 2017
Apr 17, 2016
Oct 29, 2017
Apr 23, 2016
Oct 28, 2017
Feb 18, 2023
May 14, 2016

Repository files navigation

pythonvm-rust

Build Status

A Python virtual machine, written in Rust.

Status

This project is inactive. Check out RustPython instead

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