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.10-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89057d1bc9c76fdcfca2d23ea054d7c4c1cde935c052eed9f5d3197067b97fa9 |
|
MD5 | 946597b01566578b37568312b8c964a6 |
|
BLAKE2b-256 | cc1aca244433842e9b330831a7c627da2e31636b765c90b0f3668adb1ff0368f |
Hashes for carefree_pyo3-0.1.10-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf5a77a69c634c4e2b44f0997d1f6108ebdc60d49c44ab8af08cefad11336107 |
|
MD5 | ebf5a8a0a611501a753b995b96303f72 |
|
BLAKE2b-256 | 8154422496c940f0a9138bd8e0774a9176592e30e59aefb7c8117296e3f892ca |
Hashes for carefree_pyo3-0.1.10-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94a95d8eae41df14b9800ba782f2825bdf97dc015152ffed204883a5c8879c67 |
|
MD5 | 39407cb41e9121440ac263c97970cfea |
|
BLAKE2b-256 | 0f08a4633635088f064e024538b930a47ba559ec3f3bd8a1580bbb8f9c233856 |
Hashes for carefree_pyo3-0.1.10-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4afd1317b070cb343f786618cfb040526b60efdea02106a03d9c3dd4aa1e307 |
|
MD5 | 811a816586cf5edf0ec774bf05db7e6e |
|
BLAKE2b-256 | 72f0d9ee122c0569267563fc545fe2fc0e65a732ae9845c3e6f31df41f835276 |
Hashes for carefree_pyo3-0.1.10-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1801aecec0fd120b4ed7cd81f796b468f17a6b7588898f31e08a041893e61136 |
|
MD5 | 96976e04c3fe76c438d406f3cf16cc92 |
|
BLAKE2b-256 | 6a0f02c2a8055acb7e40c1667b740338e782d6347a3f4c7a7c96b1a3801bcbb5 |