3 ms·
Hmm, I guess I'm not familiar enough with the terms to be confident that I'm using the correct terminology, but in any case it's very easy to call Rust code fro
by thinkpad20 11y ago
Hmm, I guess I'm not familiar enough with the terms to be confident that I'm using the correct terminology, but in any case it's very easy to call Rust code from C, or from Python, etc. Anything that can call C code can call Rust code (with a few compiler directives around the desired functions to prevent name mangling etc). This might not be the exact same thing as having the same ABI (although I had been under the impression that that is what it meant).
Examples:
http://blog.rust-lang.org/2015/04/24/Rust-Once-Run-Everywhere.html http://blog.rust-lang.org/2015/04/24/Rust-Once-Run-Everywher...
https://gist.github.com/seanjensengrey/f5d73bbdf22cfa1ad463 https://gist.github.com/seanjensengrey/f5d73bbdf22cfa1ad463
- tatterdemalion 11y ago"Rust's ABI" is the representation of functions without `extern` declarations. `extern` causes functions to use a different ABI, by default `extern "C"`. https://doc.rust-lang.org/reference.html#extern-functions https://doc.rust-lang.org/reference.html#extern-functions