3 ms·
It's not an issue of being able to call C code in general, which almost anything can do. The codebases for these modules use CPython API bindings to do it, thou
by nonameiguess 5y ago
It's not an issue of being able to call C code in general, which almost anything can do. The codebases for these modules use CPython API bindings to do it, though, and those won't be available in an alternative interpreter, so you'd need to completely re-write all of these libraries to use different bindings to interface between the underlying BLAS and CUDA libs and your interpreter.
Which they can do, but that is a heck of a lot more work than just writing a Python interpreter.
- brundolf 5y agoOh. So the libraries are hardcoded to only work with one specific interpreter, regardless of language? That's unfortunate.
- rcxdude 5y agoPretty much. In principle rust (or any other language) could recreate the interface but it really limits how you could design the interpreter. You either make the interface really expensive or basically just transliterate the CPython implementation into your language.