codemp/dist/py
cschen c1c9902b45 feat(python): switched to abi3 mode to allow multiple python versions with single wheel.
abi3 does not support `PyFunction` so added workaround checking for `is_callable()`
2024-09-06 00:24:37 +02:00
..
.python-version feat: added maturin wheel building config as completely separate "project", 2024-08-06 23:28:09 +02:00
build.sh wip(python): try_recv doesn't return a promise. 2024-08-22 16:52:29 +02:00
codemp.pyi fix: updated js and py glues with new errors 2024-09-05 02:33:35 +02:00
pyproject.toml feat(python): switched to abi3 mode to allow multiple python versions with single wheel. 2024-09-06 00:24:37 +02:00
README.md docs: improved cargo docs, rewrote readme 2024-09-05 01:45:48 +02:00

Python bindings

Python allows directly importing properly formed shared objects, so the glue can live mostly on the Rust side.

Our Python glue is built with PyO3.

To get a usable shared object just cargo build --release --features=python, however preparing a proper python package to be included as dependency requires more steps.

PyPI

codemp is directly available on PyPI as codemp.

Building

To distribute the native extension we can leverage python wheels. It will be necessary to build the relevant wheels with maturin. After installing with pip install maturin, run maturin build to obtain an importable package.