| Crates.io | cfpyo3_rs_bindings |
| lib.rs | cfpyo3_rs_bindings |
| version | 0.2.2 |
| created_at | 2024-09-30 17:25:43.222085+00 |
| updated_at | 2025-06-26 09:27:47.654852+00 |
| description | a collection of performant utilities |
| homepage | https://github.com/carefree0910/carefree-pyo3 |
| repository | https://github.com/carefree0910/carefree-pyo3 |
| max_upload_size | |
| id | 1391970 |
| size | 23,448 |
cfpyo3 is a collection of performant utilities.
carefree-pyo3 requires:
numpy < 2.x, because currently rust numpy doesn't support numpy 2.x.pip install carefree-pyo3
carefree-pyo3supports Python 3.8 at version0.1.x, but it is no longer maintained.
pytest
cargo bench -F criterion -p cfpyo3_rs_core -- --verbose
This project is divided into four parts - looks clumsy, but I'll introduce them and explain their necessity.
cfpyo3_rs_coreThis 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_bindingsThis 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:
rlib.rlib, it's just not good to import the whole
package because cfpyo3_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_pyThis 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.
cfpyo3This 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&f64dispatch.