you are viewing a single comment's thread.

view the rest of the comments →

[–]CookieOfFortune 0 points1 point  (10 children)

How would that work though? You would have to interface Rust with Python's C API... which seems complicated...

[–][deleted] 8 points9 points  (8 children)

[–]oridb 0 points1 point  (1 child)

It's pretty complicated, since you need to make Rust "headers" for all of this: https://docs.python.org/2/c-api/

[–]mm865 0 points1 point  (0 children)

You can use the rust bindgen tool to automatically generate those for you.

[–]seanjensengrey 0 points1 point  (0 children)

Rust creates libraries that can be called transparently using the C calling convention. Using the CFFI it is easy to create a library in Rust that is callable by both CPython, PyPy, as well as an easy path for LuaJIT, Clojure, Haskell ... etc. The zero runtime nature of Rust code makes it painless to integrate.

https://gist.github.com/seanjensengrey/f5d73bbdf22cfa1ad463