4 ms·
You can turn a Rust library into a dynamic library w/ a C ABI - exposing the whole API would be tedious, even with tools like bindgen, but if you just want to p
by colonial 2y ago
You can turn a Rust library into a dynamic library w/ a C ABI - exposing the whole API would be tedious, even with tools like bindgen, but if you just want to provide a "render this char* to PDF" function (or whatever) then it's pretty easy [1].
I know of a few Rust crates that offer something like this - Minijinja, off the top of my head.
[1]: https://doc.rust-lang.org/nomicon/ffi.html#calling-rust-code-from-c https://doc.rust-lang.org/nomicon/ffi.html#calling-rust-code...
- merb 2y agoYeah but than I would need to maintain the wrapper lib.