Correct method to expose "Reference" type #3174
Unanswered
jopemachine
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have been working on writing Python bindings for raft-rs using pyo3. All the harness test code passes, but honestly, I'm still uncertain whether I have correctly implemented and exposed the "Reference" type because lots of pyo3 code seems black box to me.
The relevant code was taken from the RefMutContainer part of the tokenizer crate's python binding.
Would there be anyone who has considered how to overcome differences in memory management between the two languages when writing bindings, or issues like exposing reference types?
By any chance, is there any advice you can give me?
https://github.com/lablup/rraft-py/blob/main/src/utils/reference.rs
Beta Was this translation helpful? Give feedback.
All reactions