4 ms·
Interesting, though the C middleman isn't necessary if you can describe to Rust's FFI that mxArray is an opaque struct (I imagine the other regular functions in
by marmaduke 11y ago
Interesting, though the C middleman isn't necessary if you can describe to Rust's FFI that mxArray is an opaque struct (I imagine the other regular functions in the MEX API are cakewalk for an FFI worth it's weight).
A while ago I wrote a mexFunction purely in Cython, and it was wondeful because Python was immediately available to work with (instead of C). The problem was that the numerical libraries on which NumPy builds often shared symbol names with MATLAB (such as svd, or hdf5) that differ in implementation resulting segfaults or corrupted data.
- marmaduke 11y agoFor the non-MATLABers, a mex function is just a small shared library which exports a single function 'mexFunction'. It's dynamically loaded by MATLAB when called in the MATLAB language.