3 ms·
I wrote on a similar topic [1], about writing system libraries in Rust with a C API and bindings to other languages. Which covers a bit of this, plus some of t
by samjs 9y ago
I wrote on a similar topic [1], about writing system libraries in Rust with a C API and bindings to other languages.
Which covers a bit of this, plus some of the sharp edges of FFI. Most of the trickier parts of it are covered in the FFI omnibus [2]. Also worth checking out is the cbindgen tool [3].
[1]: https://libpasta.github.io/blog/bindings/ https://libpasta.github.io/blog/bindings/
[2]: http://jakegoulding.com/rust-ffi-omnibus/ http://jakegoulding.com/rust-ffi-omnibus/
[3]: https://github.com/eqrion/cbindgen https://github.com/eqrion/cbindgen