{"id":16368118,"url":"https://github.com/code-ape/rust_python_extension","last_synced_at":"2026-02-26T11:30:14.024Z","repository":{"id":36320394,"uuid":"40625059","full_name":"code-ape/rust_python_extension","owner":"code-ape","description":"Demo repo showing how to build Python extension using Rust.","archived":false,"fork":false,"pushed_at":"2015-08-13T14:14:14.000Z","size":136,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T06:43:28.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-ape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-12T21:24:27.000Z","updated_at":"2017-03-28T17:18:05.000Z","dependencies_parsed_at":"2022-09-05T06:50:24.067Z","dependency_job_id":null,"html_url":"https://github.com/code-ape/rust_python_extension","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-ape%2Frust_python_extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-ape%2Frust_python_extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-ape%2Frust_python_extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-ape%2Frust_python_extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-ape","download_url":"https://codeload.github.com/code-ape/rust_python_extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239868954,"owners_count":19710478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-11T02:51:42.755Z","updated_at":"2026-02-26T11:30:13.960Z","avatar_url":"https://github.com/code-ape.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Python Extension\nDemo repo showing how to build Python extension using Rust.\n\n### Directions\n\nThis was built using `rustc 1.4.0-nightly (dcdcc6f6b 2015-08-11)` and run on `Python 2.7.10`. To run with Python3 change the `[dependencies.cpython]` section that says `features = [\"python27-sys\"]` to `features = [\"python3-sys\"]` (note, this is untested). For best results it is recommended to use exactly what I did.\n\n1. Run `cargo build --release`\n2. Run `python try_in_python.py`\n\n### Reason\n\nThis repo was created because my initial attempt to use the code Higgs provided didn't work due to very recent changes in [`dgrunwald/rust-cpython`](dgrunwald/rust-cpython) and [`SkylerLipthay/interpolate_idents`](https://github.com/SkylerLipthay/interpolate_idents). Long term I'm sure this will no longer be an issue but for those who want to do this now, this is helpful. Please refer to my `Cargo.toml` to see exactly what versions of these dependencies you'll need to successfully use this. NOTE: for now this repo is using a fork of `interpolate_idents` by dgrunwald, found [here](https://github.com/dgrunwald/interpolate_idents). There is a PR for these changes to be merged back in, found [here](https://github.com/SkylerLipthay/interpolate_idents/pull/1), which should hopefully soon make this repo unnecessary.\n\n### Credit\n\nThe example code comes straight from Ewan Higgs post on using Rust cpython crate. For a more detailed look into Higgs work see his blog post [here](http://ehiggs.github.io/2015/07/Python-Modules-In-Rust/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-ape%2Frust_python_extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-ape%2Frust_python_extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-ape%2Frust_python_extension/lists"}