{"id":19384198,"url":"https://github.com/windelbouwman/rspython","last_synced_at":"2026-02-23T16:35:07.107Z","repository":{"id":148546719,"uuid":"78270283","full_name":"windelbouwman/rspython","owner":"windelbouwman","description":"Rust implementation of the python language","archived":false,"fork":false,"pushed_at":"2018-07-07T17:48:41.000Z","size":48,"stargazers_count":34,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-01T08:48:58.181Z","etag":null,"topics":["python-language","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/windelbouwman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-07T09:28:24.000Z","updated_at":"2025-05-17T04:36:54.000Z","dependencies_parsed_at":"2023-05-20T11:45:30.523Z","dependency_job_id":null,"html_url":"https://github.com/windelbouwman/rspython","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/windelbouwman/rspython","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windelbouwman%2Frspython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windelbouwman%2Frspython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windelbouwman%2Frspython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windelbouwman%2Frspython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/windelbouwman","download_url":"https://codeload.github.com/windelbouwman/rspython/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windelbouwman%2Frspython/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29748238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-language","rust"],"created_at":"2024-11-10T09:29:30.863Z","updated_at":"2026-02-23T16:35:07.090Z","avatar_url":"https://github.com/windelbouwman.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RsPython\n\n**ATTENTION: project superseeded by: ** https://github.com/RustPython/RustPython\n\nRust implementation of the python language :snake: :scream: :metal:.\n\nATTENTION: project in prototyping phase!\n\n[![Build Status](https://travis-ci.org/windelbouwman/rspython.svg?branch=master)](https://travis-ci.org/windelbouwman/rspython)\n[![Join the chat at https://gitter.im/ppci-dev/rspython](https://badges.gitter.im/ppci-chat/rspython.svg)](https://gitter.im/ppci-chat/rspython)\n\n## Introduction\n\nThis package aims to implement the python 3 language in rust.\nCurrent implementations of the python3 language are:\n\n- CPython3 (reference implementation in C)\n- PyPy3 (python implemented in python)\n- IronPython3 (python implementation in .NET)\n- MicroPython (python implementation in C for microcontrollers)\n- RsPython (you are reading the readme now)\n\nUse cases for RsPython:\n\n- Compile RsPython to webassembly and run python3 scripts in the browser\n- Port python to Redox-os.\n- Provide an alternative implementation next to CPython\n- Combine rust with python in a more natural way\n\n## Usage\n\n    $ git clone https://github.com/windelbouwman/rspython\n    $ cd rspython\n    $ cat demos/simple.py\n    print('a=', 2 - 22)\n    $ cargo run demos/simple.py\n    a= -20\n    $ python demos/simple.py\n    a= -20\n\nTo get a whole lot of logging, use:\n\n    $ RUST_LOG=trace ./target/debug/rspython demos/simple.py\n \n## Planning\n\n- Phase 1: Minimal demo with built in print function and integer variables\n- Phase 2: Add function definitions\n- Phase 3: Add class definitions\n\n## Design\n\nThe design follows that of CPython. The code is first parsed into an AST (abstract syntax tree).\nThen it is compiled into bytecode. This bytecode is then executed by a virtual machine. The\nvirtual machine has access to several built-in python types such as `int`, `tuple`, `list`,\n`set`, `dict` and `iter`.\n\n### Parsing\n\nA handwritten lexer is combined with a [LALRPOP](https://github.com/lalrpop/lalrpop)\ngenerated parser. To deal with indentation,\nthe lexer inserts `INDENT` and `DEDENT` tokens at the appropriate points.\n\n### Compilation\n\nThe AST is transformed in bytecode. The available bytecode operations are loosely based upon\n[the ones in CPython](https://docs.python.org/3/library/dis.html#python-bytecode-instructions)\n\n## Ideas / notes\n\n- Instead of compiling to bytecode, the abstract syntax tree can be compiled into rust code and\n  compiled with the language runtime objects. This would give a speedup?\n- A compatible bytecode would be beneficial in order to be able to exchange bytecode files\n  between CPython / micropython.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindelbouwman%2Frspython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindelbouwman%2Frspython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindelbouwman%2Frspython/lists"}