You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having issues using the package when I wish to run a Rust function that returns a vector of tuples. I'm basically trying to replicate Shepmaster's excellent SO answer since my use case is very similar, but simpler - I don't wish to both send and receive a vector of tuples from Python, I only wish to receive one back.
When I build his code using milksnake with the slight change I just mentioned, everything compiles successfully, and I even receive my vector back. Unfortunately, Python thinks it's an Array type, which is the name of the user-defined type in Rust, and I can't find a way to "dereference" it into a standard Python list. milksnake doesn't directly expose user-defined Rust types like Array, and I'm not sure which magic tricks I should envoke from ctypes to make it work. The object I receive is the following:
Hello and thanks for
milksnake
!I'm having issues using the package when I wish to run a Rust function that returns a vector of tuples. I'm basically trying to replicate Shepmaster's excellent SO answer since my use case is very similar, but simpler - I don't wish to both send and receive a vector of tuples from Python, I only wish to receive one back.
When I build his code using
milksnake
with the slight change I just mentioned, everything compiles successfully, and I even receive my vector back. Unfortunately, Python thinks it's anArray
type, which is the name of the user-defined type in Rust, and I can't find a way to "dereference" it into a standard Python list.milksnake
doesn't directly expose user-defined Rust types likeArray
, and I'm not sure which magic tricks I should envoke fromctypes
to make it work. The object I receive is the following:Thanks!
The text was updated successfully, but these errors were encountered: