Re:Allowing Matlab to Talk to Rust
by dsharlet on Friday February 05, 2016 @11:38AM
(#11042527)
The main thing mex does is let you link to the matlab API libraries that are otherwise hard to get. To work around this, I like to just grab the API directly from the calling process via dlsym/GetProcAddress. That way, you can build mex libraries with any toolchain you want, even without matlab installed.
[ Parent
| on HN ]
This can be non-portable because the mex header will expand certain function calls to specific implementations depending on the mex options you use. I seem to recall e.g. mxGetM expanded to mxGetM700 in one version.