4 ms·
I assume the closed source dependency is distributed as a .a/.so/.dll file, then you can use bindgen[0]. Still, yes it's a bit more complicated. But can we not
by linkdd 4y ago
I assume the closed source dependency is distributed as a .a/.so/.dll file, then you can use bindgen[0].
Still, yes it's a bit more complicated. But can we not pretend that the non-existent toolchain in C/C++ is easier in 99% of use cases?
[0] - https://medium.com/dwelo-r-d/using-c-libraries-in-rust-13961948c72a https://medium.com/dwelo-r-d/using-c-libraries-in-rust-13961...
- snovv_crash 4y agoNo, I want a closed source Rust dependency. Otherwise it's going through a C API and I lose all of the benefits of using Rust. Once you solve this problem, C++ & CMake are of similar complexity for C++ dependencies. Otherwise to compare C++ toolchains, if it's distributed as a .a file, just adding -l/path/to/libclosed.a works for C++, can't get more simple than that. Or one line in the CMake file with basically the same thing.
- linkdd 4y agoA .rlib file then, that you can then add with: RUSTFLAGS="--extern closedlib=path/to/libclosedlib.rlib"