Is it possible to call Rust from python script and how?


can we use something like ctypes or cffi which calls C++ from python ?


Yes, that’s one way to do it. The other is to use python bindings:


This post has examples using cffi in Python for numerical type work. If you use this as a reference, make sure to note the comment on using std::slice::from_raw_parts and the correction related to the _as_f64_array python function in the example.