rust → python made easy
Project description
carefree-pyo3
cfpyo3
is a collection of performant utilities.
Installation
carefree-pyo3
requires:
- Python 3.8 or higher.
numpy < 2.x
, because currently rust numpy doesn't support numpy 2.x.
pip install carefree-pyo3
Test
pytest
Benchmark (Rust)
cargo bench -F criterion -p cfpyo3_rs_core -- --verbose
Architecture
This project is divided into four parts - looks clumsy, but I'll introduce them and explain their necessity.
cfpyo3_rs_core
This is the Rust core of the project, and is meant to be responsible for the heavy lifting. Its necessity is almost self-explanatory.
cfpyo3_rs_bindings
This one looks redundant at first glance, as we already have cfpyo3_rs_py
. Initially this member did not exist, until I find some bindings in cfpyo3_rs_py
very useful, want to reuse them, and failed because:
- It is not an
rlib
. - Even I managed to make it an
rlib
, it's just not good to import the whole package becausecfpyo3_rs_py
itself is exposing lots of APIs to Python.
Another choice is to put these useful bindings in cfpyo3_rs_core
, but then GitHub CI cannot build it for whatever reason.
So at last, this member is born.
cfpyo3_rs_py
This is the 'direct' Python bindings of this project. It is just a REALLY thin wrapper around cfpyo3_rs_core
and cfpyo3_rs_bindings
, and is responsible for exposing the APIs to Python.
cfpyo3
This is the Python package that users will interact with. It is a relatively thin wrapper that dispatches the calls to cfpyo3_rs_py
.
A typical use case is the
f32
&f64
dispatch.
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 Distributions
Hashes for carefree_pyo3-0.1.11-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 222f7d595bf916eda9dc2aa8bc527ea4590a6951aec0027876fd1d7ae90b3829 |
|
MD5 | a232d4430672fd1f49b4f21e84afc8b3 |
|
BLAKE2b-256 | a3d97b044aeb7896583c5f4caac318262e75e563e70df1143c5711c45e948e9c |
Hashes for carefree_pyo3-0.1.11-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b1057d047654ae1ccb2dc3500354bfdf379a725caaf6eb2d527c08be1a7ce37 |
|
MD5 | b7324bbed337c6835835a57f68ec516b |
|
BLAKE2b-256 | ea7d2ee7e5cb9b0f7dcd6735be1a45d8b348bd349c1dbaaf660ad954a93c3b39 |
Hashes for carefree_pyo3-0.1.11-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20d436560f120566585a1db34f72242030aeb81ceb0c94c6400432f443fbf4b5 |
|
MD5 | 7fe46f7e82bda0a02b0eead389709fdd |
|
BLAKE2b-256 | 41adf8bb1678a6ecce31d1be02c93d7265f3471ae1a69a8237d2b9ad073e994f |
Hashes for carefree_pyo3-0.1.11-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7181b2604ecfb11f9782662aaa1f3aab2891e2cf815757c31f2a08424487f77e |
|
MD5 | 96902f7edd51beb75030fafcdff4bc73 |
|
BLAKE2b-256 | 174abba37f689bd0f20437772da819fd8bbecf157f90882971158c1728eef258 |
Hashes for carefree_pyo3-0.1.11-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b904e8740b36e8a13c934d4ee945ce5999c04d9e5b3af9e7fccbf314061df5ef |
|
MD5 | dfcda46634ae62b955639eade2f4e4bb |
|
BLAKE2b-256 | 9fe372e792a8e62ac01689b4147913f38d6cbf385a58aa5e0b1bd629fb736c04 |