3 ms·
Yes, here's a python module written in Rust: https://github.com/dgrunwald/rust-cpython/blob/master/extensions/hello.rs https://github.com/dgrunwald/rust-cpython
by ynik 11y ago
Yes, here's a python module written in Rust: https://github.com/dgrunwald/rust-cpython/blob/master/extensions/hello.rs https://github.com/dgrunwald/rust-cpython/blob/master/extens...
But anything more complicated than that (defining extension types etc.) isn't yet supported by the high-level bindings, and would need unsafe code using the python C API directly.
- sitkack 11y agoThis looks like it is tied irreparably to the CPython interpreter. One probably doesn't want to do this. Export a clean C compatible API and call via CFFI. This has the being callable from other languages, CPython and PyPy.
- mixmastamyk 11y ago^advantage of