GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shinglyu/RustPython: A Python interpreter written in Rust

This repository was archived by the owner on May 5, 2023. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

113 Commits
113 Commits

Folders and files

NameName
Last commit message
Last commit date
RustPython
RustPython
 
 
docs
docs
 
 
python_compiler
python_compiler
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
compile_code.py
compile_code.py
 
 
init_env.sh
init_env.sh
 
 
requirements.txt
requirements.txt
 
 
test.py
test.py
 
 
test.sh
test.sh
 
 
test_all.bat
test_all.bat
 
 
test_all.sh
test_all.sh
 
 

Repository files navigation

RustPython

This repository is now part of the RustPython/RustPython project. Please go to the RustPython/RustPython project to star or contribute!


A Python interpreter written in Rust

Installation

bash init_env.sh

Run

./test.sh <path/to/file.py> # compile and run
./test.sh <path/to/file.py> --bytecode # print the bytecode in JSON
./test.sh <path/to/file.py> --dis # Run python -m dis

Manual

Given a python file test.py

python compile_code.py test.py > test.bytecode

cd RustPython
cargo run ../test.bytecode 

Testing & debugging

./test_all.sh # Run all tests under tests/
  • If a test is expected to fail or raise exception, add xfail_* prefix to the filename.

Logging

RUST_LOG=debug ./tests_all.sh

TODOs

  • Native types => Partial
  • Control flow => if(v)
  • assert => OK
  • Structural types (list, tuple, object)
  • Strings
  • Function calls => Blocked by bytecode serializer
  • Modules import
  • Generators

Goals

  • Support all builtin functions

  • Runs the pybenchmark benchmark test

  • Run famous/popular python modules (which?)

  • Compatible with CPython 3.6

Rust version

rustc 1.20.0-nightly

About

A Python interpreter written in Rust

Resources

Readme
MIT license
Activity

Stars

90 stars

Watchers

0 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.