3 ms·
Very different way of doing things compared to the JVM which is what I have most experience with. Was some kind of FFI using dlopen and sharing memory across t
by sieve 2y ago
Very different way of doing things compared to the JVM which is what I have most experience with.
Was some kind of FFI using dlopen and sharing memory across the vm boundary ever considered in the past, instead of having to compile extensions alongside a particular version of python?
I remember seeing some ffi library, probably on pypi. But I don't think it is part of standard python.
- zahlman 2y agoYou can in fact use `dlopen`, via the support provided in the `ctypes` standard library. `freetype-py` (https://github.com/rougier/freetype-py https://github.com/rougier/freetype-py) is an example of a project that works this way. To my understanding, though, it's less performant. And you still need a stable ABI layer to call into. FFI can't save you if the C code decides in version N+1 that it expects the "memory shared across the vm boundary" to have a different layout.