pyru_env is a module used to set up a combined environment for Python and Rust
Project description
pyru_env
pyru_env is a module used to set up a combined environment for Python and Rust.
The generated environment includes code that demonstrates how Python can call Rust through C ABI.
Install:
pip install pyru_env
NOTE TO SELF: expand on how to install in different scenarios
Usage:
python3 -m pyru_env or python -m pyru_env (inside an empty directory)
main.py is located at /python/src/main.py. If running outputs no errors, the setup is working as intended.
Explanation:
Your main.py includes code to build and load your rust library, depending on your OS.
The rust environment is created just as if you had ran "cargo new arbitrary_name --lib" except Cargo.toml also includes 'crate-type = ["cdylib"]' and lib.rs is overwritten with two C ABI examples.
pyru_env calls venv with the same python you used to call pyru_env.
Requirements:
- Python 3.9+
- Rust (cargo, rustc) https://rustup.rs
- Tested on Linux and Windows (ubuntu24, windows11)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyru_env-0.1.0.tar.gz.
File metadata
- Download URL: pyru_env-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
776fee4be8ceef2a42024cefc10336f16fd468ed79ed39b04cbc92ef128d5506
|
|
| MD5 |
210cfd6a757fbda5a3386a863b224380
|
|
| BLAKE2b-256 |
3384859801474c57a85103e4806f1ca2fb9f0b2214422c91d5b4052fd79c1775
|
File details
Details for the file pyru_env-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyru_env-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c04af22c8bf467ed34b546177ae81fedc82b01125a1e67b7021b73eb4a0fe210
|
|
| MD5 |
d626d3f73d13a03c5f7d9520f283d012
|
|
| BLAKE2b-256 |
d801efd4cc6ac805fe9284408dd43fef12c1a44827046b86a2d4a8c6ddf1d546
|