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.12-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65d0553b697f3df79fafbc05ca1b4c0172366213450f571024912d3f6e63e4e |
|
MD5 | c82c4473c9bcbc6d2deb7ddd55537c27 |
|
BLAKE2b-256 | cda0603e484d546d344a3d515de85d5f897e27626596b099839dcbd11c608dbf |
Hashes for carefree_pyo3-0.1.12-cp38-abi3-manylinux_2_24_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65616b9429590d841214dc17dfb1f8126bb0792bbee7bfc237210b0f6aca6cff |
|
MD5 | 67e754e46f63b33affb49431a498b151 |
|
BLAKE2b-256 | bacd3898c99aeda02eb16271dfc81c14a1a0aabe7daceda632cf71c909dc4a52 |
Hashes for carefree_pyo3-0.1.12-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d4842867ff1128e634b6e82ba51d81a8f06d863b00bff706028f9514f3470ae |
|
MD5 | beb7b5b00fb3da14bb3402995420212f |
|
BLAKE2b-256 | 141663f5b7d73c83a4228e0ca29dc08d5001c0467afc635367dce4f8cf45edd3 |
Hashes for carefree_pyo3-0.1.12-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc5b0bfbb3e2e251dd60b1c7664a294db0cf9fb1849668ae8e8e111decd9a9c |
|
MD5 | 5c0f516ad8b3ce3f48e5a6a6f9e4bd5a |
|
BLAKE2b-256 | 37cc348711aa7823f5d898c27d0aaa55a77404311f699aa50021cf7f506e468b |
Hashes for carefree_pyo3-0.1.12-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 128cd55fb9727e386dc086eb425a2ad0aa228aebf9552aede608b40c5b455d6c |
|
MD5 | 653eace7552d984475d387056b9d44c0 |
|
BLAKE2b-256 | 4fdd8a5904e7ff46e97dc0432b0ba5ad588b924713e01a9250e797025b4a4b67 |