Crates.io | py03_helper_macros |
lib.rs | py03_helper_macros |
version | 0.0.2 |
source | src |
created_at | 2023-12-31 13:38:09.562136 |
updated_at | 2023-12-31 13:43:52.580621 |
description | A procedural macro to help wrapping rust structs for pyo3 |
homepage | https://gitlab.com/retrokiller543/pyo3-helper-macro |
repository | https://gitlab.com/retrokiller543/pyo3-helper-macro |
max_upload_size | |
id | 1084779 |
size | 26,613 |
This is a crate to provide helper macros for the PyO3 crate. Currently, it only supports wrapping impl blocks with the necessary boilerplate to make them work with PyO3 without having to rewrite functions.
To make this crate not use hacky workarounds to make it work you must use the feature multiple-pymethod
for the PyO3 crate and same for this crate. This will enable you to use more than one impl block for a type and activate the wrap_impl
macro in this crate.
If this is not used you will need to use the pyo3_bindings
macro to generate and store the wrapped functions in a file until the impl_pyo3
macro is called that will then generate one single impl block with all the functions in it.
Note that the names of the macros will change in future releases
See the docs for information on how to use the macros.