Hi, pyo3 seems to be for calling Python from Rust. You need the opposite, Rust from Python, e.g. as described in <https://bheisler.github.io/post/calling-rust-in-python/> Making a PyPI (pip) package seems to be the most obvious option. With the current (outdated, I think) policies it will not be possible to make such a package standard part of Sage (but I am gathering support for relaxing these policies - see the thread on standard pip packages - that's what would be needed).
HTH, Dima On 1 June 2024 13:46:14 CEST, Jing Guo <dev.g...@gmail.com> wrote: >Dear all, > >Recently we released a library for counting graph homomorphisms [0] in >Sage. Due to performance and parallelism reasons, I was considering the >possibility of re-writing some/all of the algorithms in Rust. I found a >Rust library called `pyo3` [1] seems to be good for Python-Rust interop. > >The latest post I could found is from one year ago [2], so I was wondering >what the current status of possibility of integrating libraries written in >Rust into Sage? Is the recommended approach still to make it an optional >package? For instance, what I have something in mind is like `addcombq` [3] >-- a Rust library which is callable from Sage/Python. > >Many thanks! > >Jing > >[0]: https://github.com/guojing0/count-graph-homs >[1]: https://github.com/PyO3/pyo3 >[2]: https://groups.google.com/g/sage-devel/c/OpBIfmbOlPA/m/hFKTdyE4CgAJ >[3]: https://github.com/Torrencem/addcombq > >-- >You received this message because you are subscribed to the Google Groups >"sage-devel" group. >To unsubscribe from this group and stop receiving emails from it, send an >email to sage-devel+unsubscr...@googlegroups.com. >To view this discussion on the web visit >https://groups.google.com/d/msgid/sage-devel/604dc1b9-d5ae-48bc-a181-dd9007ff3082n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/DE2098C6-DECD-4A6B-8C18-C68CDD125281%40gmail.com.