[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5389":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":15,"starSnapshotCount":15,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},5389,"RustPython","RustPython\u002FRustPython","A Python Interpreter written in Rust","https:\u002F\u002Frustpython.github.io",null,"Rust",22114,1442,169,284,0,7,19,78,28,100.78,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34],"compiler","hacktoberfest","interpreter","jit","language","python-language","python3","rust","wasm","2026-06-12 04:00:25","\u003Cimg src=\".\u002Flogo.png\" width=\"125\" height=\"125\" align=\"right\" \u002F>\n\n# [RustPython](https:\u002F\u002Frustpython.github.io\u002F)\n\nA Python-3 (CPython >= 3.14.0) Interpreter written in Rust :snake: :scream:\n:metal:.\n\n[![Build Status](https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\u002Fworkflows\u002FCI\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\u002Factions?query=workflow%3ACI)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002FRustPython\u002FRustPython\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002FRustPython\u002FRustPython)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002FRustPython\u002FRustPython.svg)](https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\u002Fgraphs\u002Fcontributors)\n[![Discord Shield](https:\u002F\u002Fdiscordapp.com\u002Fapi\u002Fguilds\u002F1043121930691149845\u002Fwidget.png?style=shield)][discord]\n[![docs.rs](https:\u002F\u002Fdocs.rs\u002Frustpython\u002Fbadge.svg)](https:\u002F\u002Fdocs.rs\u002Frustpython\u002F)\n[![Crates.io](https:\u002F\u002Fimg.shields.io\u002Fcrates\u002Fv\u002Frustpython)](https:\u002F\u002Fcrates.io\u002Fcrates\u002Frustpython)\n[![dependency status](https:\u002F\u002Fdeps.rs\u002Fcrate\u002Frustpython\u002F0.1.1\u002Fstatus.svg)](https:\u002F\u002Fdeps.rs\u002Fcrate\u002Frustpython\u002F0.1.1)\n[![Open in Gitpod](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=Open%20in&message=Gitpod&color=1aa6e4&logo=gitpod)](https:\u002F\u002Fgitpod.io#https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython)\n\n## Usage\n\n**Check out our [online demo](https:\u002F\u002Frustpython.github.io\u002Fdemo\u002F) running on WebAssembly.**\n\nRustPython requires Rust latest stable version (e.g 1.67.1 at February 7th 2023). If you don't\ncurrently have Rust installed on your system you can do so by following the instructions at [rustup.rs](https:\u002F\u002Frustup.rs\u002F).\n\nTo check the version of Rust you're currently running, use `rustc --version`. If you wish to update,\n`rustup update stable` will update your Rust installation to the most recent stable release.\n\nTo build RustPython locally, first, clone the source code:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\n```\n\nRustPython uses symlinks to manage python libraries in `Lib\u002F`. If on windows, running the following helps:\n```bash\ngit config core.symlinks true\n```\n\nThen you can change into the RustPython directory and run the demo (Note: `--release` is\nneeded to prevent stack overflow on Windows):\n\n```bash\n$ cd RustPython\n$ cargo run --release demo_closures.py\nHello, RustPython!\n```\n\nOr use the interactive shell:\n\n```bash\n$ cargo run --release\nWelcome to rustpython\n>>>>> 2+2\n4\n```\n\nNOTE: For windows users, please set `RUSTPYTHONPATH` environment variable as `Lib` path in project directory.\n(e.g. When RustPython directory is `C:\\RustPython`, set `RUSTPYTHONPATH` as `C:\\RustPython\\Lib`)\n\nYou can also install and run RustPython with the following:\n\n```bash\n$ cargo install --git https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython rustpython\n$ rustpython\nWelcome to the magnificent Rust Python interpreter\n>>>>>\n```\n\n### venv\n\nBecause RustPython currently doesn't provide a well-packaged installation, using venv helps to use pip easier.\n\n```sh\n$ rustpython -m venv \u003Cyour_env_name>\n$ . \u003Cyour_env_name>\u002Fbin\u002Factivate\n$ python # now `python` is the alias of the RustPython for the new env\n```\n\n### PIP\n\nIf you'd like to make https requests, you can enable the `ssl` feature, which\nalso lets you install the `pip` package manager. Note that on Windows, you may\nneed to install OpenSSL, or you can enable the `ssl-vendor` feature instead,\nwhich compiles OpenSSL for you but requires a C compiler, perl, and `make`.\nOpenSSL version 3 is expected and tested in CI. Older versions may not work.\n\nOnce you've installed rustpython with SSL support, you can install pip by\nrunning:\n\n```bash\ncargo install --git https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\nrustpython --install-pip\n```\n\nYou can also install RustPython through the `conda` package manager, though\nthis isn't officially supported and may be out of date:\n\n```bash\nconda install rustpython -c conda-forge\nrustpython\n```\n\n### SSL provider\n\nFor HTTPS requests, `ssl-rustls` feature is enabled by default. You can replace it with `ssl-openssl` feature if your environment requires OpenSSL.\nNote that to use OpenSSL on Windows, you may need to install OpenSSL, or you can enable the `ssl-vendor` feature instead,\nwhich compiles OpenSSL for you but requires a C compiler, perl, and `make`.\nOpenSSL version 3 is expected and tested in CI. Older versions may not work.\n\n### WASI\n\nYou can compile RustPython to a standalone WebAssembly WASI module so it can run anywhere.\n\nBuild\n\n```bash\ncargo build --target wasm32-wasip1 --no-default-features --features freeze-stdlib,stdlib --release\n```\n\nRun by wasmer\n\n```bash\nwasmer run --dir `pwd` -- target\u002Fwasm32-wasip1\u002Frelease\u002Frustpython.wasm `pwd`\u002Fextra_tests\u002Fsnippets\u002Fstdlib_random.py\n```\n\nRun by wapm\n\n```bash\n$ wapm install rustpython\n$ wapm run rustpython\n>>>>> 2+2\n4\n```\n\n#### Building the WASI file\n\nYou can build the WebAssembly WASI file with:\n\n```bash\ncargo build --release --target wasm32-wasip1 --features=\"freeze-stdlib\"\n```\n\n> Note: we use the `freeze-stdlib` to include the standard library inside the binary. You also have to run once `rustup target add wasm32-wasip1`.\n\n### JIT (Just in time) compiler\n\nRustPython has a **very** experimental JIT compiler that compile python functions into native code.\n\n#### Building\n\nBy default the JIT compiler isn't enabled, it's enabled with the `jit` cargo feature.\n\n```bash\ncargo run --features jit\n```\n\nThis requires autoconf, automake, libtool, and clang to be installed.\n\n#### Using\n\nTo compile a function, call `__jit__()` on it.\n\n```python\ndef foo():\n    a = 5\n    return 10 + a\n\nfoo.__jit__()  # this will compile foo to native code and subsequent calls will execute that native code\nassert foo() == 15\n```\n\n## Embedding RustPython into your Rust Applications\n\nInterested in exposing Python scripting in an application written in Rust,\nperhaps to allow quickly tweaking logic where Rust's compile times would be inhibitive?\nThen `examples\u002Fhello_embed.rs` and `examples\u002Fmini_repl.rs` may be of some assistance.\n\n## Disclaimer\n\nRustPython is in development, and while the interpreter certainly can be used\nin interesting use cases like running Python in WASM and embedding into a Rust\nproject, do note that RustPython is not totally production-ready.\n\nContribution is more than welcome! See our contribution section for more\ninformation on this.\n\n## Conference videos\n\nCheckout those talks on conferences:\n\n- [FOSDEM 2019](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=nJDY9ASuiLc)\n- [EuroPython 2018](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=YMmio0JHy_Y)\n\n## Use cases\n\nAlthough RustPython is a fairly young project, a few people have used it to\nmake cool projects:\n\n- [GreptimeDB](https:\u002F\u002Fgithub.com\u002FGreptimeTeam\u002Fgreptimedb): an open-source, cloud-native, distributed time-series database. Using RustPython for embedded scripting.\n- [pyckitup](https:\u002F\u002Fgithub.com\u002Fpickitup247\u002Fpyckitup): a game engine written in\n  rust.\n- [Robot Rumble](https:\u002F\u002Fgithub.com\u002Frobot-rumble\u002Flogic\u002F): an arena-based AI competition platform\n- [Ruff](https:\u002F\u002Fgithub.com\u002Fcharliermarsh\u002Fruff\u002F): an extremely fast Python linter, written in Rust\n\n## Goals\n\n- Full Python-3 environment entirely in Rust (not CPython bindings)\n- A clean implementation without compatibility hacks\n\n## Documentation\n\nCurrently along with other areas of the project, documentation is still in an\nearly phase.\n\nYou can read the [online documentation](https:\u002F\u002Fdocs.rs\u002Frustpython) for the\nlatest release, or the [user guide](https:\u002F\u002Frustpython.github.io\u002Fdocs\u002F).\n\nYou can also generate documentation locally by running:\n\n```shell\ncargo doc # Including documentation for all dependencies\ncargo doc --no-deps --all # Excluding all dependencies\n```\n\nDocumentation HTML files can then be found in the `target\u002Fdoc` directory or you can append `--open` to the previous commands to\nhave the documentation open automatically on your default browser.\n\nFor a high level overview of the components, see the [architecture](architecture\u002Farchitecture.md) document.\n\n## Contributing\n\nContributions are more than welcome, and in many cases we are happy to guide\ncontributors through PRs or on Discord. Please refer to the\n[development guide](DEVELOPMENT.md) as well for tips on developments.\n\nWith that in mind, please note this project is maintained by volunteers, some of\nthe best ways to get started are below:\n\nMost tasks are listed in the\n[issue tracker](https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\u002Fissues). Check issues\nlabeled with [good first issue](https:\u002F\u002Fgithub.com\u002FRustPython\u002FRustPython\u002Fissues?q=label%3A%22good+first+issue%22+is%3Aissue+is%3Aopen+) if you wish to start coding.\n\nTo enhance CPython compatibility, try to increase unittest coverage by checking this article: [How to contribute to RustPython by CPython unittest](https:\u002F\u002Frustpython.github.io\u002Fguideline\u002F2020\u002F04\u002F04\u002Fhow-to-contribute-by-cpython-unittest.html)\n\nAnother approach is to checkout the source code: builtin functions and object\nmethods are often the simplest and easiest way to contribute.\n\nYou can also simply run `python -I scripts\u002Fwhats_left.py` to assist in finding any unimplemented\nmethod.\n\n## Compiling to WebAssembly\n\n[See this doc](wasm\u002FREADME.md)\n\n## Community\n\n[![Discord Banner](https:\u002F\u002Fdiscordapp.com\u002Fapi\u002Fguilds\u002F1043121930691149845\u002Fwidget.png?style=banner2)][discord]\n\nChat with us on [Discord][discord].\n\n## Code of conduct\n\nOur code of conduct [can be found here](code-of-conduct.md).\n\n## Credit\n\nThe initial work was based on\n[windelbouwman\u002Frspython](https:\u002F\u002Fgithub.com\u002Fwindelbouwman\u002Frspython) and\n[shinglyu\u002FRustPython](https:\u002F\u002Fgithub.com\u002Fshinglyu\u002FRustPython)\n\n[discord]: https:\u002F\u002Fdiscord.gg\u002Fvru8NypEhv\n\n## Links\n\nThese are some useful links to related projects:\n\n- https:\u002F\u002Fgithub.com\u002FProgVal\u002Fpythonvm-rust\n- https:\u002F\u002Fgithub.com\u002Fshinglyu\u002FRustPython\n- https:\u002F\u002Fgithub.com\u002Fwindelbouwman\u002Frspython\n\n## License\n\nThis project is licensed under the MIT license. Please see the\n[LICENSE](LICENSE) file for more details.\n\nThe [project logo](logo.png) is licensed under the CC-BY-4.0\nlicense. Please see the [LICENSE-logo](LICENSE-logo) file\nfor more details.\n","RustPython 是一个用 Rust 语言编写的 Python 解释器。它支持 Python 3（CPython >= 3.14.0）的核心功能，并且具有即时编译（JIT）能力，提高了执行效率。该项目使用 Rust 的内存安全特性来增强解释器的稳定性和性能，同时支持 WebAssembly，使得在浏览器中运行 Python 代码成为可能。RustPython 适用于需要高性能 Python 执行环境的场景，特别是对内存安全有较高要求的应用，以及希望在 Web 端利用 Python 进行计算或开发的场合。",2,"2026-06-11 03:03:00","top_language"]